Forum Discussion

mosam's avatar
mosam
Frequent Visitor
3 years ago
Solved

Up and Down Arrows in KPI

I want to implement up and down arrows based on last two columns of this matrix. But I got arrows for all the columns. Can anybody help with this.
My dax codes:
1. 

CurrentMonthCount = CALCULATE(MAX(Galle_Base[Count]),FILTER(Galle_Base,Galle_Base[Date] = MAX(Galle_Base[Date])) )
2.
PreviousMonthCount = CALCULATE(MAX(Galle_Base[Count]),FILTER(Galle_Base,Galle_Base[Date] = MAX(Galle_Base[Date])-1))
3.
Indicator =
SWITCH(
    TRUE(),
    [CurrentMonthCount] > [PreviousMonthCount],
    UNICHAR(9650),
    BLANK())
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi mosam ,

     

    Sorry, that was a spelling error on my part.

    Update the measure.

    Indicator = 
    var _date1=MAXX(FILTER(ALL('Galle_Base'),'Galle_Base'[Site Name]=MAX('Galle_Base'[Site Name])),[Date])
    var _date2=_date1-1
    return 
    SWITCH(
        TRUE(),
        [CurrentMonthCount] > [PreviousMonthCount] && SELECTEDVALUE('Galle_Base'[Date])=_date1, UNICHAR(9650),
        [CurrentMonthCount] > [PreviousMonthCount] && SELECTEDVALUE('Galle_Base'[Date])=_date2, UNICHAR(9650),
        BLANK())

     

    Best Regards,

    Neeko Tang

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

4 Replies