Forum Discussion
To compute some rows dynamically
Hi,
I have modified my pbi file with adding up a new measure for representing the previous week sales.
Now i am stuck up while re-assigning the value of previous week sales to the field Total.
Is there any way to perform iteration in DAX and traverse for each record?
Please find the link of new pbi file below
https://drive.google.com/drive/folders/12Ou3PcwDie0aju7ZV8ISSbeKsvXdZ6Vp
Thanks for your help!!
Hi,
Can anyone please help me with this?
I am really stuck up on it,have tried to implement this functionality in sql but it has become a way too complex.
I need this really badly.
- v-jiascu-msft8 years agoMicrosoft Employee
Hi sajal161292,
Sorry so late. Too much work to do. I found a workaround though it isn't prefect. You can try it and may get some ideas. You can test it in this file.
Measure = CALCULATE ( SUMX ( SUMMARIZE ( '0ShortageData', '0ShortageData'[Org], '0ShortageData'[Part], '0Calendar'[Week], "value", SUM ( '0ShortageData'[Quantity] ) ), [value] ), ALL ( '0ShortageData'[OrderType (groups)] ), FILTER ( ALL ( '0Calendar' ), '0Calendar'[Week] < MAX ( '0Calendar'[Week] ) ) )Best Regards,
Dale
- v-jiascu-msft8 years agoMicrosoft Employee
Hi sajal161292,
Could you please mark the proper answer as solution or share the solution if it's convenient for you? That will be a big help to the others.
Best Regards!
Dale