Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello,
consider the table
Letter | Number |
A | 1 |
A | 1 |
A | 2 |
A | 2 |
B | 3 |
B | 3 |
B | 3 |
and the measure
Despite the ALL(Table[Number]) statement in the CALCULATE function, the Number slicer seems to somehow combine with the Letter slicer and interfere with the measure. I don't understand this - what's going on and how can I prevent this? I would like the measure to behave as if the Number slicer wasn't there.
In reality, the measure is more complicated. I can't just set the Number slicer to not filter the card visual, as I need the Number filter later on in the measure.
Thanks for help and explanations!
Solved! Go to Solution.
I created a solution:
To do this I expanded the data model with two new dimension tables:
Thanks for the clarification, @kpost , you are right.
But I can also give more detail on the problem: In the end, I would like to implement a Kolmogorov-Smirnov Test in order to check whether two non-overlapping subsets of the table stem from the same distribution. One subset shall be chosen by the Letter slicer and the other by the Number slicer. In order to achieve this, the DAX Code of the measure contains the lines
VAR m=CALCULATE(COUNTROWS(Table),ALL(Table[Number]))
VAR n=CALCULATE(COUNTROWS(Table),ALL(Table[Letter]))
RETURN [Result of some calculation involving m and n]
I haven't mentioned this background at first, because it adds nothing to the actual problem and might only be confusing.
I created a solution:
To do this I expanded the data model with two new dimension tables:
Thanks, @kpost , that's exactly what I needed. But I still do not understand the logic of Power BI far enough to know WHY my previous solution did not work, whereas yours works... Any hints?
There are usually a few ways to do something, and in this case there's most likely a way to do it with only DAX.
To be honest I tried a similar approach as you for a while and got stumped, so I went to something that I was sure would work. Perhaps somebody else will come along and provide a more elegant solution, but at least you have something that works, for now, and can continue with your project.
///Mediocre Power BI advice, but it's free///
Hi @hs248 ,
I think it would be better if you can provide the problem statement in detail- like what are you trying to achieve before we come to selection of DAX functions to achieve that?
Also, I can observe that A letter has a pair with Number 1 and 2 but not with 3 as per the data. Both of your slicers selections make impact on the cue card value. Therefore, when you select letter A in slicer 1 filters out 3.
Hope that might help you understand the issue here.
thanks,
AM
The desired behavior asked for by @hs248 is that without modifying visual interactions, the card will produce the number 4 when "A" and "3" are both selected. The desired behavior is to count the number of rows in 'Table' where Letter matches the Letter(s) selected in the Letter slicer, regardless of what is selected in the Number slicer.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
76 | |
55 | |
37 | |
34 |
User | Count |
---|---|
99 | |
56 | |
51 | |
44 | |
40 |