Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

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 below. Here's an example of what I would like to present and my developed DAX.

 

DAX ERROR:

 

error arrow indicator.PNG

 

 

EXPECTED EXAMPLE:

 

print matrix example.PNG

 

MY DAX:

 

DAX MATRIX.PNG

 

Setas =
var LastData = CALCULATE([Montante Real Por Data RNA/CNA],FILTER(FATO_AR,MONTH(FATO_AR[NOVO_CORTE]) = MAX(MONTH(FATO_AR[NOVO_CORTE])
)))

var LastData1ant = CALCULATE([Montante Real Por Data RNA/CNA],FILTER(FATO_AR,MONTH(FATO_AR[NOVO_CORTE]) = MAX(MONTH(FATO_AR[NOVO_CORTE])-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)))

 

 

1 ACCEPTED SOLUTION
v-joesh-msft
Solution Sage
Solution Sage

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.

View solution in original post

1 REPLY 1
v-joesh-msft
Solution Sage
Solution Sage

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.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.