Forum Discussion
Calculating Daily values from Cumulative Total
- 4 years ago
Your example starts here:
I'll add a new index column [Index1] = [Index] + 1 and then self merge:
Expand Total_Values
Define a new [Daily_Values] column as the difference between the total and the previous total.
Result:
File attached.
- 4 years ago
Hi,
This calculated column formula works
Daily value = [Total_Values]-lookupvalue(RunningTotal[Total_Values],RunningTotal[Date],CALCULATE(max(RunningTotal[Date]),FILTER(RunningTotal,RunningTotal[Date]<EARLIER(RunningTotal[Date]))))Hope this helps.
- 4 years ago
Hello zawlh
The image and DAX code are given below for your quick reference.
DailyValue2 = [DailyValue] - CALCULATE(MAX(RunningTotal[Total_Values]), FILTER(ALL(RunningTotal[Date]), RunningTotal[Date] < MAX(RunningTotal[Date])))Url to the pbix file https://drive.google.com/file/d/1pKkRWxJI56oKT2MeLsPKfF-tldwPlMzK/view?usp=sharing
Regards
Kumail Raza
LinkedIn: https://www.linkedin.com/in/kumail-raza-76508856/
If this answers your query, mark it as the solution.
Kudos are appreciated.
- 4 years ago
Hi zawlh ,
According to your description, hereās my solution.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Although I checked the above links and tried, I don't quite understand how to check those solutions. So that, I attached the file to get your help.
In the file, you may find two columns: Date, Total_Values. I would like to request to add new column to get daily update Number.
Thank you for you help.
- AlexisOlson4 years agoSuper User
Your example starts here:
I'll add a new index column [Index1] = [Index] + 1 and then self merge:
Expand Total_Values
Define a new [Daily_Values] column as the difference between the total and the previous total.
Result:
File attached.
- zawlh4 years agoHelper I
It is also a good idea. Thank you for your help.
- Ashish_Mathur4 years agoSuper User
Hi,
This calculated column formula works
Daily value = [Total_Values]-lookupvalue(RunningTotal[Total_Values],RunningTotal[Date],CALCULATE(max(RunningTotal[Date]),FILTER(RunningTotal,RunningTotal[Date]<EARLIER(RunningTotal[Date]))))Hope this helps.
- zawlh4 years agoHelper I
This helps me a lot. Thank you for your help.
- Ashish_Mathur4 years agoSuper User
You are welcome.
- Kumail4 years agoImpactful Individual
Hello zawlh
The image and DAX code are given below for your quick reference.
DailyValue2 = [DailyValue] - CALCULATE(MAX(RunningTotal[Total_Values]), FILTER(ALL(RunningTotal[Date]), RunningTotal[Date] < MAX(RunningTotal[Date])))Url to the pbix file https://drive.google.com/file/d/1pKkRWxJI56oKT2MeLsPKfF-tldwPlMzK/view?usp=sharing
Regards
Kumail Raza
LinkedIn: https://www.linkedin.com/in/kumail-raza-76508856/
If this answers your query, mark it as the solution.
Kudos are appreciated.
- zawlh4 years agoHelper I
I requested your shared file. I tried with your equation and I doesn't work well.
Whatever, I really appreciate your help. Thank you.- Kumail4 years agoImpactful Individual
The working pbix file is added to the drive. Feel free to download it for your reference.
- zawlh4 years agoHelper I
Your shared file works. Thank you for your help.