电源BI过滤数据具有独家条件
这是我被问到的卷曲问题,我不确定如何在PowerBi中解决它(我正在帮助的用户专门使用它,因此我没有选择更舒适的编程语言)。
我们的情况(例如)他们希望根据所选治疗方法和该处理的响应值过滤化合物名称。到目前为止,基本切片机都很好。
但是,他们希望仅看到那些针对特殊选择的治疗范围内有反应的化合物,如果另一种治疗方法在该范围内也有反应,他们希望掉落该化合物。
例如,下表是我合成的东西,给出一个简单的例子:
复合 | 治疗 | 响应 |
---|---|---|
1 | A | 13.80 |
1 | B | 8.25 |
1 | C | 9.22 |
1 | D | 10.50 |
2 | A | 11.66 |
2 | B | 8.42 |
2 | C | 12.63 |
2 | D | 9.63 |
在这种情况下,我有A复选框切片机进行处理和滑块切片机以进行响应。如果我为响应指定11-14的范围,那么当前的行为是我具有处理A和处理A的化合物1,并用处理A和C。 1和2进行治疗A。
所需的行为将仅具有处理A的化合物1,因为化合物2在该范围内也具有治疗C。
我觉得这可能是适当的DAX可行的,但我不知道从哪里开始。
This has been a curly question I have been asked and I am unsure how to tackle it in PowerBI (the user I am helping is specifically using it so I don't have the option to lean on a more comfortable programming language).
We have a situation where (for example) they are wanting to filter for compound names based upon a selected treatment and a response value from that treatment. So far so good with basic slicers.
HOWEVER they then wish to see ONLY those compounds that have a response in the correct range for the specifically chosen treatment, and if another treatment has a response in that range too, they wish to drop that compound.
For example, the following table is something I synthesized that gives an easy example:
Compound | Treatment | Response |
---|---|---|
1 | A | 13.80 |
1 | B | 8.25 |
1 | C | 9.22 |
1 | D | 10.50 |
2 | A | 11.66 |
2 | B | 8.42 |
2 | C | 12.63 |
2 | D | 9.63 |
In this case, I have a checkbox slicer for treatment and a slider slicer for response. If I specify a range of 11 - 14 for the response, the current behaviour is that I have compound 1 with treatment A and compound 2 with treatment A and C. Then if I select Treatment A for the treatment slicer, I just have both compound 1 and 2 with treatment A.
The desired behaviour would be to have ONLY compound 1 with treatment A because compound 2 has treatment C within this range too.
I feel like this is probably doable with an appropriate DAX but I don't know where to start with this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我正确理解,则只需要
compound
,而治疗较少。创建一个新的度量:
它对给定化合物的结果排名(即表中的线)。
然后,您将此新措施添加到“过滤器”区域中的“过滤器”区域中。然后将过滤器设置为1
。
If I understood correctly, you want the
Compound
with the less treatment(s) only.Create a new measure:
It ranks the number of results (ie. lines in the Table) for a given Compound.
Then, you add this new measure in the Filters bar, in "Filters on this visual" zone. And you set the filter to 1.