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
Hello Experts, @MFelix
I need help to highlight column of Latest Month.
means change column color based on X-axis Values dynamically.
highlite column with selected color where date/month in X-axis is latest/max. below SS is desired result.
I have written below DAX and applied to column color but it changes all bar color with latest.
LatestMonthColumnColor =
VAR maxMonth = CALCULATE( max(CycleDayUnpivot[EndDate1stOfMonth]), ALL(CycleDayUnpivot))
RETURN IF(MAX(CycleDays[EndDate1stOfMonth])=maxMonth, "#EE9771")
Solved! Go to Solution.
@Chirag4370 , Create one measure for Latest Month
LatestMonth = CALCULATE(MAX(CycleDayUnpivot[EndDate1stOfMonth]), ALL(CycleDayUnpivot))
And trying updating second measure
LatestMonthColumnColor =
VAR maxMonth = [LatestMonth]
RETURN IF(MAX(CycleDays[EndDate1stOfMonth]) = maxMonth, "#EE9771", "#DefaultColor")
Proud to be a Super User! |
|
@Chirag4370 Did you add your measure to the conditional formatting of the column color in the format pane?
@Chirag4370 Review the following attached screenshot and DAX formula:
LatestMonth =
CALCULATE(
MAX('financials'[Date]),
ALL('financials')
)
IsLatestMonth =
VAR LatestMonth = MONTH([LatestMonth])
VAR LatestYear = YEAR([LatestMonth])
VAR CurrentMonth = MONTH(MAX('financials'[Date]))
VAR CurrentYear = YEAR(MAX('financials'[Date]))
RETURN
IF(CurrentMonth = LatestMonth && CurrentYear = LatestYear, 1, 0)
@Chirag4370 Hope it works.
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
@Chirag4370 , Create one measure for Latest Month
LatestMonth = CALCULATE(MAX(CycleDayUnpivot[EndDate1stOfMonth]), ALL(CycleDayUnpivot))
And trying updating second measure
LatestMonthColumnColor =
VAR maxMonth = [LatestMonth]
RETURN IF(MAX(CycleDays[EndDate1stOfMonth]) = maxMonth, "#EE9771", "#DefaultColor")
Proud to be a Super User! |
|
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
87 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |