Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
hey all, whats up?
so my boss told me he wants a line chart that presents the % difference between two running totals.. so far so good - i have created the measures for the running total which:
Solved! Go to Solution.
Hi @Anonymous ,
We can use the following measure to meet your requirement.
Last 4 weeks =
var last_4 = MAX('Table'[Date])-4*7
var current_ = MAX('Table'[Date])
return
CALCULATE(SUM('Table'[values]),FILTER(ALLSELECTED('Table'),'Table'[Date]>last_4 && 'Table'[Date] <= current_))
The Last 4 weeks values doesn’t change if you select a slicer date, you can use the following measure. Replace ALLSELECTED with ALL.
Last 4 weeks =
var last_4 = MAX('Table'[Date])-4*7
var current_ = MAX('Table'[Date])
return
CALCULATE(SUM('Table'[values]),FILTER(ALL('Table'),'Table'[Date]>last_4 && 'Table'[Date] <= current_))
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that we have shared?
BTW, pbix as attached.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
We can use the following measure to meet your requirement.
Last 4 weeks =
var last_4 = MAX('Table'[Date])-4*7
var current_ = MAX('Table'[Date])
return
CALCULATE(SUM('Table'[values]),FILTER(ALLSELECTED('Table'),'Table'[Date]>last_4 && 'Table'[Date] <= current_))
The Last 4 weeks values doesn’t change if you select a slicer date, you can use the following measure. Replace ALLSELECTED with ALL.
Last 4 weeks =
var last_4 = MAX('Table'[Date])-4*7
var current_ = MAX('Table'[Date])
return
CALCULATE(SUM('Table'[values]),FILTER(ALL('Table'),'Table'[Date]>last_4 && 'Table'[Date] <= current_))
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that we have shared?
BTW, pbix as attached.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hey @v-zhenbw-msft , thanks alot for your message, its working! the 2nd measure is exactly what i needed.
THANKS!!
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |