Forum Discussion
Realized cumulative calculation
Hello everybody,
Here I have a DAX function which calculate realized actions on the month :
As you can see, it doesn't give the expected result. I tried different things but impossible to find the solution.
Can somebody can give me help to resolve this problem ?
- Anonymous3 years ago
Hi Anonymous ,
Please update the formula of your measure for culmulative calculation as below and check if it can return the expected result...
Culmulative = CALCULATE ( SUM ( 'AERO - Achats'[Réalisé] ) / 1000, FILTER ( ALLSELECTED ( 'Dim - Versions' ), 'Dim - Versions'[PQM - Année Mois] <= MAX ( 'Dim - Versions'[PQM - Année Mois] ) ) )If the above one can't help you, please provide some raw data in your table 'AERO - Achats' with Text format and your expected result with backend logic and special examples? By the way, is there any relationship between these two tables? If yes, please provide the related info. It would be helpful to find out the solution. You can refer the following link to share the required info:
How to provide sample data in the Power BI Forum
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
2 Replies
- AnonymousNot applicable
Hi Anonymous ,
Please update the formula of your measure for culmulative calculation as below and check if it can return the expected result...
Culmulative = CALCULATE ( SUM ( 'AERO - Achats'[Réalisé] ) / 1000, FILTER ( ALLSELECTED ( 'Dim - Versions' ), 'Dim - Versions'[PQM - Année Mois] <= MAX ( 'Dim - Versions'[PQM - Année Mois] ) ) )If the above one can't help you, please provide some raw data in your table 'AERO - Achats' with Text format and your expected result with backend logic and special examples? By the way, is there any relationship between these two tables? If yes, please provide the related info. It would be helpful to find out the solution. You can refer the following link to share the required info:
How to provide sample data in the Power BI Forum
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
- Ashish_MathurSuper User
Hi,
This process/patern will work.
- Create a Calendar Table with calculated column formlas for Year, Month name and Month number. Sort the Month name by the Month number.
- Create a relationship (Many to One and Single) from the Date column of your Data Table to the Date column of the Calendar Table
- To your visual, drag Year and Month from the Calendar Table
- Write these measures
Total = divide(SUM('AERO - Achats'[Réalisé]),1000)
Total YTD = calculate([Total],datesytd('Calendar'[date]))
Hope this helps.