Forum Discussion
Card showing wrong rowcount. whatif filter ignored
so i need to explicitly filter the value that's shown in the card/label?
There's no way to make the what if parameter filter 'global'/page level?
See if this works for you:
You can use the "Quantity filter" in slicers, and all the "filter pane" filter options.
For example:
Here is the file if you're interested. PBIX file
- jakubk6 years ago
Helper I
Hi Paul
The filtered table isn't working because it's showing rows where qty is > the selected quantity filter
as a user i want to see the records that are below a threshold that I set via a slider
I also want to see a label display the number of records
Ashish_Mathurno your solution deleted my table altogether and put in some weird between slider. I wasn't sure what question you were answering
I resolved this a week or so ago but it doesn't feel like a good solution. I was hoping i was doing it the wrong way and there was a more logical/cleaner way
what I ended up with is here: https://drive.google.com/file/d/1iU1xKHl2dfrQb2oCTSTpxagYtyPL-hxF/view?usp=sharing
- PaulDBrown6 years ago
Community Champion
I can see why you think it isn't working...but it is. I actually left the [Sum Quantity] measure in the table, which will display all values relevant to the filter context (but is unaffected by the "what if" condition), on purpose so that you could see what was going on. If you remove this measure, you will get the table showing only the rows which meet the "Quantity Filter" condition ( <= ).
For example:
The relevant measures for your purposes are therefore:
[Row count] which counts the rows where the condition is met
[Quantity less than or equal to] which returns the quantity only for rows which meet the condition.
You also mention you want a label which displays the number of records. That is what the Card visual in green in my example is doing. Or are you after something else?
- jakubk6 years ago
Helper I
ok, so its still very fiddly with having to create not obvious custom filtered measures
isn't there a way to create a boolean flag and use that as filter?
eg
Column = if(Data[Quantity]<=SELECTEDVALUE('Quantity Filter'[Quantity Filter]), true, false)i tried but it always returns false - PaulDBrown6 years ago
Community Champion
It won't work. Calculated columns are not dynamic. They are calculated when the table is loaded and are immune to slicers and filters
- jakubk6 years ago
Helper I
ahhh
And I can't add a boolean as a measure and filter on it because if this bug (already tried) - https://community.powerbi.com/t5/Desktop/BOOLEAN-column-can-t-apply-filter-in-Power-BI-Desktop/td-p/58800
thanks for the info