Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi
How can I calculate diiff bet values from current & previous month and apply conditional formatting if the diff is -ve should be colored red ive created columns for month and displaying values by region
Solved! Go to Solution.
Hi, @Anonymous ;
Try to create a measure.
bet =
var _curr=CALCULATE(SUM([Value]),FILTER(ALL('Table'),EOMONTH([Date],0)=EOMONTH(MAX([Date]),0)))
var _previous=CALCULATE(SUM([Value]),FILTER(ALL('Table'),EOMONTH([Date],0)=EOMONTH(MAX([Date]),-1)))
return _curr-_previous
Then apply it conditional format.
The final output is shown below:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous ;
Try to create a measure.
bet =
var _curr=CALCULATE(SUM([Value]),FILTER(ALL('Table'),EOMONTH([Date],0)=EOMONTH(MAX([Date]),0)))
var _previous=CALCULATE(SUM([Value]),FILTER(ALL('Table'),EOMONTH([Date],0)=EOMONTH(MAX([Date]),-1)))
return _curr-_previous
Then apply it conditional format.
The final output is shown below:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , Create a color measure like
Arrow color =
var _change =[MTD Sales]-[Last MTD Sales]
return
SWITCH (
TRUE(),
_change > 0, "green",
_change = 0, "blue",
_change < 0, "red"
)
where we have , measure like these using TI and date table
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))
next month Sales = CALCULATE(SUM(Sales[Sales Amount]),nextmonth('Date'[Date]))
this month = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH('Date'[Date])))
last MTD (complete) Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,MONTH))))
previous month value = CALCULATE(sum('Table'[total hours value]),previousmonth('Date'[Date]))
User | Count |
---|---|
107 | |
89 | |
81 | |
76 | |
73 |
User | Count |
---|---|
112 | |
104 | |
96 | |
74 | |
66 |