Forum Discussion
Sales vs Previous Sales
Hey everyone,
I want to compare the sales of a quarter compared with its previous quarter.
So, when the Total Sales is higher compared to the Total Sales Previous Quarter, I want to show a green arrow.
A red arrow should be shown when the Total Sales is lower. And a question Mark when you can't compare it,
so when there is no data for the Total Sales or the Total Sales Previous Quarter.
My measure is as follows:
The results is shown below. But This is not what I expected. I am looking for the result as shown in the most right column.
I made several adjustments in my measure, but not with the result I was looking for.
Can anyone help me out, please?
Measure = SWITCH( TRUE, ISBLANK( SUM('Table'[Column2] )) || ISBLANK( SUM('Table'[Column4]) ),[Question Mark], SUM('Table'[Column2]) > SUM('Table'[Column4]),[Arrow Up ↑], SUM('Table'[Column2]) < SUM('Table'[Column4]),[Arrow Down ↓] )
2 Replies
- freginier
Solution Sage
Measure = SWITCH( TRUE, ISBLANK( SUM('Table'[Column2] )) || ISBLANK( SUM('Table'[Column4]) ),[Question Mark], SUM('Table'[Column2]) > SUM('Table'[Column4]),[Arrow Up ↑], SUM('Table'[Column2]) < SUM('Table'[Column4]),[Arrow Down ↓] ) - CNENFRNL
Community Champion
Learn more about built-in conditional formatting functionality of PBI
Conditional table formatting in Power BI Desktop - Power BI | Microsoft Docs