Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
The matrix has values on rows where a1,a2,a3... are different measures distributed along the
8 weeks date range. I want a conditional formatting as for the date 24-01-2022. When the value for the current week (i.e. 24-01-2022) is greater than prev week (i.e. 17-01-2022) there should be a green upward arrow and when less it should show a red downward arrow. How to get this format?
Solved! Go to Solution.
Hi @Anonymous ,
Try to add the following measure and then use the values to do the contional formatting:
Condittional format =
VAR currentWeek =
SELECTEDVALUE ( Table[Date] )
VAR TotalWeek =
CALCULATE ( MAX ( Table[Date] ), ALLSELECTED ( Table ) )
VAR CurrentWeekValue =
SUM ( Table[Vaalue] )
VAR PreviousWeekValue =
CALCULATE (
SUM ( Table[Value] ),
FILTER (
ALL ( Table[Date] ),
Table[Date]
= MAX ( Table[Date] ) - 7
)
)
RETURN
IF (
currentWeek = TotalWeek,
IF ( CurrentWeekValue - PreviousWeekValue < 0, -1, 1 )
)
Be aware that this measure only works when the fact table only has one date for each week (weekly data) if you have daily data this needs to be modified.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Anonymous ,
Try to add the following measure and then use the values to do the contional formatting:
Condittional format =
VAR currentWeek =
SELECTEDVALUE ( Table[Date] )
VAR TotalWeek =
CALCULATE ( MAX ( Table[Date] ), ALLSELECTED ( Table ) )
VAR CurrentWeekValue =
SUM ( Table[Vaalue] )
VAR PreviousWeekValue =
CALCULATE (
SUM ( Table[Value] ),
FILTER (
ALL ( Table[Date] ),
Table[Date]
= MAX ( Table[Date] ) - 7
)
)
RETURN
IF (
currentWeek = TotalWeek,
IF ( CurrentWeekValue - PreviousWeekValue < 0, -1, 1 )
)
Be aware that this measure only works when the fact table only has one date for each week (weekly data) if you have daily data this needs to be modified.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Anonymous ,
Unfortunately, Conditional formatting of icons supports only static values for the rules. You can submit your idea on power bi ideas website.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
When you refer that you want to have the condittional formatting should be for the current week is the maximum week selected on the 8 weeks range?
Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.
If the information is sensitive please share it trough private message.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsCheck out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
96 | |
58 | |
45 | |
42 |