Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi folks, I have one table with 2 measures
"Total Revenues" , "Total Budget"
I have a 3rd measure that prints "OK" if the first 2 columns have the same value otherwise prints "KO" if Total Revenues" <> "Total Budget".
Works fine, but I can't insert a Slicer Filter to filter only rows with "OK" (or "KO") values
Any suggestion is appreciated.
Thanks,
Solved! Go to Solution.
We can't directly put a measure into a slicer since the measure need to be sliced to get the corresponding data. In your scenario, you can create a calculated table and build those measures into calculated column, then you can use apply slicers on these columns.
Calculated Table = ADDCOLUMNS(
Table,
"Purchased",CALCULATE(SUM('Fact Purchase'[Ordered Quantity])),
"Sales",CALCULATE(SUM('Fact Sale'[Quantity])),
"_meas", IF([Purchased]=[Sales];"OK";"KO")
)
Regards,
Simon Hou
You can't put a measure as a slicer choice. You could try adding a bar chart with the 2 text items on the axis and count as the value. Then try clicking the bars
Hi, thanks for your reply
"You could try adding a bar chart with the 2 text items on the axis and count as the value. Then try clicking the bars"
What do you mean with "with the 2 text items on the axis"?
I'm not able to add the 3rd measure as AXIS in a bar chart
Could you supply some sample data (as text, not screen shot) and your measure calculations so that the problem can be recreated? See this post:
http://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
For testing I use sample database WorldWideImportersDW
and below my measures
Purchased = CALCULATE(SUM('Fact Purchase'[Ordered Quantity]))Sales = CALCULATE(SUM('Fact Sale'[Quantity]))_meas = IF([Purchased]=[Sales];"OK";"KO")
So I need filtering only rows "OK" or "KO"
Can you just use a Visual Filter, Page Filter or Report Filter?
I need a Visual Filter
We can't directly put a measure into a slicer since the measure need to be sliced to get the corresponding data. In your scenario, you can create a calculated table and build those measures into calculated column, then you can use apply slicers on these columns.
Calculated Table = ADDCOLUMNS(
Table,
"Purchased",CALCULATE(SUM('Fact Purchase'[Ordered Quantity])),
"Sales",CALCULATE(SUM('Fact Sale'[Quantity])),
"_meas", IF([Purchased]=[Sales];"OK";"KO")
)
Regards,
Simon Hou
How do you build this table? Where do you write the script you supplied?
Is there any documentation you can supply to show how this is done?
Thanks,
Dan.
I may be incorrect, but I'm not sure that is possible. The reason is that since it is a measure, it has a value in a visual only according to the specific context of that visual. Filters are special in that they allow measures to be used to filter visuals versus all of the visuals aren't going to allow you to do this in the way you want. There may be a tricky way around it but I'm not thinking of it right now. I seem to remember that perhaps there was a way around this or a similar problem by using VALUES...
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 37 | |
| 35 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 74 | |
| 69 | |
| 39 | |
| 35 | |
| 23 |