March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Calculate difference in New measure as +/- change and also % change from prior day. Pulling my hair our crating this.
If day is True then subtract prior day that is True show the differance.
also calculate in a second column as a % of change.
Solved! Go to Solution.
Hi @KingJoel
You can refer to the following sample
Then line_total and the workday are the measures
line_total = SUM('Table'[Sum])
Work Day = IF(MAX('Table'[False/true])=1,TRUE(),FALSE())
Original data
You can create the following measures
Diff =
IF (
[Work Day] = TRUE (),
VAR a =
MAXX (
FILTER (
ALLSELECTED ( 'Table' ),
[load_date] < MAX ( 'Table'[load_date] )
&& [Work Day] = TRUE ()
),
[load_date]
)
RETURN
[line_total]
- CALCULATE ( [line_total], 'Table'[load_date] = a )
)
%diff = [Diff]/[line_total]
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @KingJoel
You can refer to the following sample
Then line_total and the workday are the measures
line_total = SUM('Table'[Sum])
Work Day = IF(MAX('Table'[False/true])=1,TRUE(),FALSE())
Original data
You can create the following measures
Diff =
IF (
[Work Day] = TRUE (),
VAR a =
MAXX (
FILTER (
ALLSELECTED ( 'Table' ),
[load_date] < MAX ( 'Table'[load_date] )
&& [Work Day] = TRUE ()
),
[load_date]
)
RETURN
[line_total]
- CALCULATE ( [line_total], 'Table'[load_date] = a )
)
%diff = [Diff]/[line_total]
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Proud to be a Super User! | |
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
85 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |