Forum Discussion
Substracting data for proper visualization
- 9 months ago
hi MKPartner
First get the number equivalent of your week (not wk42, 43) as you will have trouble comparing those weeks if week numbers aren't always in "00" format. For example Wk10 is next to Wk1 alphabetically. You should be able to get that in the query editor by duplicating your week colum and then replacing WK with nothing for the duplicate. Once you have that, create this measure:
VAR _prevWk = CALCULATE ( [sum of value], FILTER ( ALL ( 'table'[wk number] ), 'table'[wk number] = MAX ( 'table'[wk number] ) - 1 ) ) RETURN [sum of value] - _prevWkOtherwise please provide a workable sample data (not an image), your expected result from the same sample data and your reasoning behind. You may post a link to Excel or a sanitized copy of your PBIX stored in the cloud.
Hi MKPartner,
Use Below DAX
Lam_Variance_Weekly =
SUMX(
VALUES('Demand Schedule_Lam D'[Week]), -- or your week/date column
ABS(SUM('Demand Schedule_Lam D'[lam_var]))
)
π I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
π‘ Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
π As a proud SuperUser and Microsoft Partner, weβre here to empower your data journey and the Power BI Community at large.
π Curious to explore more? [Discover here].
Letβs keep building smarter solutions together!
- MKPartner9 months agoHelper II
Thanks for feedback but it's not the result which I want to have. Values for each week didn't change. Only last column is different againt previous image.