Forum Discussion
pceglie
9 years agoResolver I
Filter by a measure
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...
- 9 years ago
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
v-sihou-msft
9 years agoMicrosoft Employee
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
drad
7 years agoHelper I
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.