Forum Discussion
Anonymous
6 years agoNot applicable
comparing current year with last year
Hi guys, I am new to power bi i want to compare the current year with Last Year. I am Having data from 2017 january to 2019 November. I have connected through Live Cube data. I have used a for...
- 6 years ago
Hi Anonymous ,
Replace ALLSELECTED in the formula with ALL to see if it works, or you can try the following measure:
Current Year = CALCULATE ( SUM ( 'Table1'[TotalAmount] ), FILTER ( ALL ( 'Table1' ), Table1[Date].[Year] = MAX ( Table1[Date].[Year] ) ) )Last_year = CALCULATE ( SUM ( 'Table1'[TotalAmount] ), FILTER ( ALL ( 'Table1' ), Table1[Date].[Year] = MAX ( Table1[Date].[Year] ) - 1 ) )If it doesn't meet your requirement, kindly share your sample data if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.
Best Regards,
Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
mwegener
Most Valuable Professional
6 years agoHi @sathish_kumar ,
Could you post a screenshot of the model view?
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.