Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
Created a calculated Measure "Flag" based on below logic . User can choose either Include or Exlcude.
Unit Price = Sum(Amount)/Sum(Units)
Flag = if [Unit Price] > 25,"Include","Exlcude" .
Flag is working as expected when Product and Account are present in visualization.
Date | Sales Rep | Region | Account | Product | Amount | Units | UnitPrice (Amount/Units) |
1/1/2022 | Matt | East | 1004 | A | 200 | 5 | 40 |
1/1/2022 | Matt | East | 1004 | B | 100 | 5 | 20 |
1/1/2022 | Alex | West | 1002 | C | 150 | 3 | 50 |
1/2/2022 | David | South | 1003 | D | 100 | 1 | 100 |
1/2/2022 | Matt | East | 1003 | D | 200 | 2 | 100 |
1/2/2022 | Alex | West | 1004 | A | 100 | 2 | 50 |
Above flag is not working in this case. expected Amount for Matt is 400 but its showing 500. Any suggestions to fix flag.
Region | Sales Rep | Sales | Expected amount |
East | Matt | 500 | 400 |
West | Alex | 250 | 250 |
South | David | 100 | 100 |
Thanks in advance.
Solved! Go to Solution.
Hi @kanth123
Please try using this measure for the flag
Flag = CALCULATE(SUM('Units'[Amount]),FILTER(Units,'Units'[UnitPrice] > 25))
Kind regards,
Seanan
If this post helped, please consider accepting it as the solution.
Hi @kanth123
Please try using this measure for the flag
Flag = CALCULATE(SUM('Units'[Amount]),FILTER(Units,'Units'[UnitPrice] > 25))
Kind regards,
Seanan
If this post helped, please consider accepting it as the solution.
Hi @Seanan
tried filter option in measure. Its giving different values when Account and product are removed from visual.
Wanted to apply filter at Visual or Page level to filter data.
Hi @kanth123
In my table the measure seems to be working fine.
Is this the result you were looking for?
If not could you please explain further what you require the measure to display and how you intend to use it.
User | Count |
---|---|
99 | |
90 | |
85 | |
74 | |
67 |
User | Count |
---|---|
114 | |
103 | |
100 | |
72 | |
64 |