Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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:
EXPECTED EXAMPLE:
MY DAX:
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)))
Solved! Go to Solution.
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.
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.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |