Forum Discussion
CJBoelt
3 years agoFrequent Visitor
How do I create a DAX calculating the change per sequence?
Here is a Example of what the new graph would be. Essentially subtracting the actual_hours with all the values in the previous rows. This will provide a measure to show the difference of ch...
- 3 years ago
=SUM(Table[[Total Actual hours])-CALCULATE(SUM(Table[[Total Actual hours]),TOPN(1,FILTER(ALLSELECTED(Table[SEQ]),Table[SEQ]<MAX(Table[SEQ])),Table[SEQ]))
CJBoelt
3 years agoFrequent Visitor
wdx223_Daniel
This works! Thank you!
I have one additional question if you are able,
I have a function [Gaussian_Hours] which calculates a forecast of values which by a normal Distribution, though for some reason this new measure is incredible show (to measure the increase by SEQ.
Do you have any ideas for why the performance is slow?
Thank you!
wdx223_Daniel
Community Champion
3 years agoperformance optimization is hard work, it involves many aspects. you can try this code, maybe it won't work or not.
SeqChange=[Gaussian_Hours]-CALCULATE([Gaussian_Hours],OFFSET(-1,,ORDERBY(PROJ_FRIDAY_SEQ[SEQ#])))