March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I have a chart like this.
Now, I have an year column on x-axis.
Year
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
I have already claculated measures like total sales etc., on y-axis.
requirement: i want years 2015... 2021 to be grouped under A and coloured in grey
and current year(2022 , 2023 ,2024 ) to be grouped under B and coloured in blue.
Help is appreciated
requirement:
Solved! Go to Solution.
I hope below are your expectation.
Expected existing:
Expected Outcome:
To achieve this, you have to create a calculated column with the below code and use it in your visual.
Group =
IF ( Sales[Year] >= 2015 && Sales[Year] <= 2021, "A", "B" )
To change the colors. go to the visual format pane. Under the format pane choose columns and enable show all and change the color to grey for A and Blue for B.
Thanks,
I hope below are your expectation.
Expected existing:
Expected Outcome:
To achieve this, you have to create a calculated column with the below code and use it in your visual.
Group =
IF ( Sales[Year] >= 2015 && Sales[Year] <= 2021, "A", "B" )
To change the colors. go to the visual format pane. Under the format pane choose columns and enable show all and change the color to grey for A and Blue for B.
Thanks,
Hi @Arul ,
Thanks for the solution.
Group =
IF ( Sales[Year] <= 2021 && sales[MonthNo]= Month(now()-1,
[measure1],[measure2] )
when I wrote this Calculated column, it says circular dependency was detected.
How do I avoid this?
Hi @Pallavi_m,
You can write a measure formula to compaore current year and the specific year range to return color code, then you can use it on data color conditional formatting.
Regards,
Xiaoxin Sheng
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
116 | |
77 | |
58 | |
52 | |
46 |
User | Count |
---|---|
167 | |
117 | |
63 | |
57 | |
50 |