Forum Discussion

JUANROVALETTI's avatar
JUANROVALETTI
Frequent Visitor
3 years ago
Solved

conditional formatting in a column chart

HI in my monthly report where the user must select a month i have all my visual affected by that month slicer.   But i add one visual where i want to show : the total spend from the begining...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi JUANROVALETTI ,

     

    I suggest you to create an unrelated calendar table to help your calculation.

    Unrelated DimMonth = CALCULATETABLE('Calendar')

    Measure:

    Month Spend = 
    VAR _SELECTYEARMONTH = SELECTEDVALUE('Unrelated DimMonth'[YearMonth])
    RETURN
    CALCULATE(SUM('Table'[Sales]),'Calendar'[YearMonth] = _SELECTYEARMONTH)
    
    Color = 
    VAR _SELECTMONTH = SELECTEDVALUE('Unrelated DimMonth'[MonthName])
    RETURN
    IF(MAX('Calendar'[MonthName]) = _SELECTMONTH,"Yellow")

    Configure the column color as below.

    Result is as below.

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.