Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
What is the efficient dax to compare current value to previous value to derive up and down arrows ?
Input Table
City Station Measurement Time
Brooklyn S1 1.3 08/27/2020 7:00 am
Brooklyn S1 1.4 08/27/2020 7:30 am
Brooklyn S1 1.5 08/27/2020 8:00 am
Brooklyn S1 1.5 08/27/2020 8:30 am
Brooklyn S1 1.3 08/27/2020 9:00 am
Brooklyn S2 3.4 08/27/2020 7:30 am
Brooklyn S2 4.5 08/27/2020 8:00 am
Brooklyn S2 5.5 08/27/2020 8:30 am
Output
Brooklyn S1 Down Arrow
Brookyn S2 Up Arrow
Solved! Go to Solution.
@curiouspbix0
Please try this measure; you can also use the Icon Set in Conditional Formatting with slight modIfication to this measure.
UpDown =
VAR D = MAX(Brooklyn[Time ])
VAR PD=
CALCULATE(
MAX(Brooklyn[ Measurement ]),
Brooklyn[Time ] < D
)
VAR DIF =
IF(
ISBLANK(PD), BLANK(),
IF ( MAX(Brooklyn[ Measurement ]) - PD >= 0 , UNICHAR ( 9650 ), UNICHAR ( 128315 ))
)
RETURN
DIF
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@curiouspbix0
Please try this measure; you can also use the Icon Set in Conditional Formatting with slight modIfication to this measure.
UpDown =
VAR D = MAX(Brooklyn[Time ])
VAR PD=
CALCULATE(
MAX(Brooklyn[ Measurement ]),
Brooklyn[Time ] < D
)
VAR DIF =
IF(
ISBLANK(PD), BLANK(),
IF ( MAX(Brooklyn[ Measurement ]) - PD >= 0 , UNICHAR ( 9650 ), UNICHAR ( 128315 ))
)
RETURN
DIF
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@curiouspbix0 , display with city and station
measure =
calculate(sum(Table[Measurement]), filter(Allselected(Table[Time]), table[Time] =max(Table[Time]))) -calculate(lastnonblankvalue(Table[Time],sum(Table[Measurement])), filter(Allselected(Table[Time]), table[Time] <max(Table[Time])))
you can write logic for up and down
| User | Count |
|---|---|
| 23 | |
| 21 | |
| 20 | |
| 17 | |
| 11 |
| User | Count |
|---|---|
| 56 | |
| 54 | |
| 43 | |
| 36 | |
| 32 |