Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
I have data downloaded daily which are filtered by days in table '12week_plan'[Data]. I have a table with columns where I'd like to implement conditional formating of each row to indicate changes of value like decreased, increaased or it's equal against previous day.
I'm using below DAX to get it:
CF_Act_WK =
VAR ACT_DAY = CALCULATE('12week_plan'[Act_WK],
FILTER('12week_plan','12week_plan'[Data]))
VAR PREV_DAY = CALCULATE('12week_plan'[Act_WK],
FILTER('12week_plan','12week_plan'[Data]-1))
RETURN
SWITCH(True(),
ACT_DAY - PREV_DAY < 0,"ColoredArrowDown",
ACT_DAY - PREV_DAY = 0,"ColoredArrowRight",
"ColoredArrowUP")
My issue is that when I changing dates filter, I can always see "ColoredArrowRight" mark evan values are decreasing or increasing.
Thanks for support.
Solved! Go to Solution.
_test = // Try this might help you
VAR CurrentDate = SELECTEDVALUE('12week_plan'[Data])
VAR PrevDate =
CALCULATE(
MAX('12week_plan'[Data]),
FILTER(
ALL('12week_plan'),
'12week_plan'[Data] < CurrentDate
)
)
VAR CurrentValue = CALCULATE(SUM('12week_plan'[Act_WK]))
VAR PrevValue = CALCULATE(SUM('12week_plan'[Act_WK]), '12week_plan'[Data] = PrevDate)
RETURN
SWITCH(
TRUE(),
CurrentValue > PrevValue, "ColoredArrowUp",
CurrentValue < PrevValue, "ColoredArrowDown",
"ColoredArrowRight"
)
Did I answer your question? If so, please mark my post as a solution!
Proud to be a Super User!
_test = // Try this might help you
VAR CurrentDate = SELECTEDVALUE('12week_plan'[Data])
VAR PrevDate =
CALCULATE(
MAX('12week_plan'[Data]),
FILTER(
ALL('12week_plan'),
'12week_plan'[Data] < CurrentDate
)
)
VAR CurrentValue = CALCULATE(SUM('12week_plan'[Act_WK]))
VAR PrevValue = CALCULATE(SUM('12week_plan'[Act_WK]), '12week_plan'[Data] = PrevDate)
RETURN
SWITCH(
TRUE(),
CurrentValue > PrevValue, "ColoredArrowUp",
CurrentValue < PrevValue, "ColoredArrowDown",
"ColoredArrowRight"
)
Did I answer your question? If so, please mark my post as a solution!
Proud to be a Super User!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 37 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 130 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |