Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi,
I am trying to use a measure to change the font colour and title of a visual card.
The switch function has been set up to determin colour based on 2 meassure.
I want the colour to be green if current week is larger than previous week.
I want the colour to be red if current week is smaller than previous week.
I have tried rearranging the order of my formula to show red first and this hasnt made a difference.
I have used if statements as well and no difference. The font colour result shows red in the 3rd card, however the conditional format says green.
Any help on why the conditional formatting is not recognising the correct value will be greatly appreciated.
Best,
Michael
Thank you for your reply, v-zhangt. I appreciate it!
That is so strange. But I believed it would be the case. I do not understand why it goes wrong when I place the measure in that specific visual card.
Please find the measures for Current week and Previous week:
I shall keep trying and see what happens when I use other measures to try and narrow the problem down.
Best,
Michael
Hi, @MichaelO
I tried to reproduce your problem, but unsuccessfully. You can refer to my measure calculation.
Sample data:
Current Week = CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),[Week]=WEEKNUM(TODAY(),2)))Previous Week = CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),[Week]=WEEKNUM(TODAY(),2)-1))
You can expand the value of [Current Week] in the table to see if there is a problem with the calculation.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 80 | |
| 49 | |
| 35 | |
| 31 | |
| 30 |