Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello Everyone,
I need to calculate sales of Last year from starting 01.01.2021 to current date of last year i.e 20.05.2021
In below dax I can calculate only for 01.01.2021 to 20.05.2021
Please guide me what modification shall I do to get sales for 01.01.2021 to 20.05.2021 instead of 01.05.2021 to 20.05.2021
@amitchandak @SpartaBI @Ashish_Mathur @DataInsights @Jihwan_Kim @johnt75 @ribisht17
Solved! Go to Solution.
Hi,
I will look into the filter context inside the CALCULATE function.
In the current DAX measure, there is one condition that sets month number as the same as today's month number. Please try to remove that condition.
I hope this helps to rewrite a measure to show the result that you want.
Thanks.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi,
Try this measure
Hi,
I will look into the filter context inside the CALCULATE function.
In the current DAX measure, there is one condition that sets month number as the same as today's month number. Please try to remove that condition.
I hope this helps to rewrite a measure to show the result that you want.
Thanks.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Thank you Sir. It worked ..
(1) Solved: Total of last year on the same period as this year... - Microsoft Power BI Community
Last Year Sale = CALCULATE(SUM(tablename[SalesAmount]), SAMEPERIODLASTYEAR(DateTable[Date]))
Regards,
Ritesh
Thank you for your response.. I will try this measures too.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.