Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Urgent arrow indicator error

Hi guys!   I am trying to create a column  in my table with some arrows to indicate if the value of the last month has increased or decreased from the previous month, but I am facing the error belo...
  • v-joesh-msft's avatar
    6 years ago

    Hi Anonymous ,

    Try the measure below:

    Setas =
    VAR LastData =
        CALCULATE (
            [Montante Real Por Data RNA/CNA],
            FILTER (
                FATO_AR,
                FATO_AR[NOVO_CORTE].[MonthNo] = MAX ( MONTH ( FATO_AR[NOVO_CORTE].[MonthNo] ) )
            )
        )
    VAR LastData1ant =
        CALCULATE (
            [Montante Real Por Data RNA/CNA],
            FILTER (
                FATO_AR,
                FATO_AR[NOVO_CORTE].[MonthNo]
                    = MAX ( MONTH ( FATO_AR[NOVO_CORTE].[MonthNo] ) - 1 )
            )
        )
    VAR Evolucao =
        IF ( LastData1ant = BLANK (), BLANK (), LastData1ant - LastData )
    VAR Down =
        UNICHAR ( 9660 )
    VAR Up =
        UNICHAR ( 9650 )
    VAR Side =
        UNICHAR ( 9655 )
    RETURN
        IF (
            Evolucao > 0,
            Down,
            IF ( Evolucao = 0, Side, IF ( Evolucao = BLANK (), Side, Up ) )
        )

    Best Regards,

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