Forum Discussion
Boolean calculations measure
Hi, all.
Have table with the following columns:
Date - CompanyID - Licenses
Have measures:
SumLicense = SUMX('Billing';'Billing'[Licenses])
SumLicensePreviousWeek = CALCULATE(SUMX('Billing';'Billing'[Licenses]);DATEADD('Calendar'[Date];-7;DAY))
Difference = SumLicense-SumLicensePreviousWeek
Need to calculate Total Difference is less than 0 and Total Difference is greater than 0 for current Year and visualize it for card or pie chart.
For example i can add measures for table and add filters less/greater than 0 and get calculations that i needed in string "Total".
Аnyone have ideas how i can visualize it for card or pie chart?
Thanks in advance.
Bessonnizza add following two measures and use these in pie chart. hope it helps.
Would appreciate Kudos 🙂 if my solution helped.
Measure above zero = SUMX ( VALUES ( Table[CompanyId] ), IF ( [Difference] > 0, [Difference] ) ) Measure below zero = SUMX ( VALUES ( Table[CompanyId] ), IF ( [Difference] < 0, [Difference] ) )
4 Replies
- parry2kSuper User
Bessonnizza you cannot change th visual of table visual to pie chart and I believe it should work. If you already tried it and then what didn't woked in pie chart, please explain.
- BessonnizzaHelper II
Hi, parry2k
I'm sorry, i'm not correctly at all. Yes, it works, but pie chart must include two values:
1) SUM [Difference] with condition [Difference]>0
2) |SUM [Difference]| with condition [Difference]<0Need value which circled red.
I have troubles with measure which calculate SUM [Difference] with condition [Difference]>0 or <0.
- parry2kSuper User
Bessonnizza add following two measures and use these in pie chart. hope it helps.
Would appreciate Kudos 🙂 if my solution helped.
Measure above zero = SUMX ( VALUES ( Table[CompanyId] ), IF ( [Difference] > 0, [Difference] ) ) Measure below zero = SUMX ( VALUES ( Table[CompanyId] ), IF ( [Difference] < 0, [Difference] ) )