The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
User | Count |
---|---|
86 | |
84 | |
36 | |
35 | |
32 |
User | Count |
---|---|
95 | |
75 | |
67 | |
53 | |
52 |