Forum Discussion
newbie9292
5 years agoHelper II
Help with DAX query
Hi, I am new to power bi and DAX world. I am trying to get data using a DAX query : Last_year_Kum_AE_Combined = CALCULATE(SUM(AE_Combined[AuftrEing]),FILTER(ALLSELECTED(Date_dim),Date_dim[Date]<=...
- 5 years ago
Hi newbie9292
You can create two measures as:
Running Total = CALCULATE ( SUM('Table'[Sales]), FILTER ( ALLSELECTED('Table'[Date]), 'Table'[Date] <= MAX ('Table'[Date] ) && YEAR('Table'[Date])=YEAR(MAX('Table'[Date])) ) )Ly Running Total = CALCULATE ( SUM('Table'[Sales]), FILTER ( ALLSELECTED('Table'[Date]), 'Table'[Date] <= MAX ('Table'[Date] ) && YEAR('Table'[Date])=YEAR(MAX('Table'[Date])) && DATEADD('Table'[Date],-1,YEAR) ) )If you still have some question, please don't hesitate to let me known.
Best Regards,
Link
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!
newbie9292
5 years agoHelper II
Hello Link,
Thanks for your reply. I tried your suggested solution but for some reason I am getting the same values for 2020 and 2021.
v-xulin-mstf
5 years agoCommunity Support
Hi newbie9292
Is your issue solved?
If the issue has been solved, please adopt the solution to help others.
If you still have some question, please don't hesitate to let me known.
😉
Best Regards,
Link
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!