Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hey Guys,
I have a Bar Chart with months on the x-axis and i would like to change the colour for those month in which we are current in and for those ones in the future.
So Sep, Okt, Nov, and Dez should be shown in a different colour.
Anyone who knows how to solve this???
Solved! Go to Solution.
Hi, @Anonymous
You can try the following methods. Calculate the numbers for the year and month with calculated columns.
Month = Month([Date])
Year = YEAR([Date])
Measure:
Color = IF(SELECTEDVALUE('Table'[Month])>=MONTH(TODAY())&&SELECTEDVALUE('Table'[Year])>=YEAR(TODAY()),"Red")
Result:
Is this the result you expect?
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.
Hi, @Anonymous
You can try the following methods. Calculate the numbers for the year and month with calculated columns.
Month = Month([Date])
Year = YEAR([Date])
Measure:
Color = IF(SELECTEDVALUE('Table'[Month])>=MONTH(TODAY())&&SELECTEDVALUE('Table'[Year])>=YEAR(TODAY()),"Red")
Result:
Is this the result you expect?
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.
Hey @v-zhangti !
Do you maybe have a similiar Solution for a BarChart with quarterly view???
I tried:
Hi @v-zhangti,
thank you so much! That is working perfectly!
Do you know if i can change the "Red" into a colour-code?
I just tried and yes it is able to just switch "Red" into any colour code that is needed. In my example "#DD5252"
Create a measure to use for the conditional formatting along the lines of:
future dates = IF(MONTH(MAX(Table[Date])) > MONTH(TODAY()) && YEAR(MAX(Table[Date])) >= YEAR(TODAY()), "Red")
Proud to be a Super User!
Paul on Linkedin.
Thanks Paul!
I guess this will go into the right direction, unfortunately there is something wrong with the function and i can´t figure out what it ist...
Should the Table[Date] part refer to my usual calendar table?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
96 | |
82 | |
74 | |
66 |
User | Count |
---|---|
121 | |
105 | |
102 | |
82 | |
72 |