Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hello,
I need to calculate Week over Week change %.
i write the following DAX but red highlighted one has Error.
How should i change the expression?
Thanks.
Solved! Go to Solution.
Hi @Anonymous ,
Please use the below formula
Measure = VAR lastWeekAmount = CALCULATE ( SUM ( Value Sum), FILTER ( ALL ( 'Calendar' ), 'Calendar'[WeekNum] = MIN ( 'Calendar'[WeekNum] ) - 1 ) ) RETURN DIVIDE ( SUM ( Value Sum ) - lastWeekAmount, lastWeekAmount, 0 )
Regards,
Gaurav Raj Singh
LinkedIN : https://www.linkedin.com/in/gauravrajsingh/
Hi @Anonymous ,
Please use the below formula
Measure = VAR lastWeekAmount = CALCULATE ( SUM ( Value Sum), FILTER ( ALL ( 'Calendar' ), 'Calendar'[WeekNum] = MIN ( 'Calendar'[WeekNum] ) - 1 ) ) RETURN DIVIDE ( SUM ( Value Sum ) - lastWeekAmount, lastWeekAmount, 0 )
Regards,
Gaurav Raj Singh
LinkedIN : https://www.linkedin.com/in/gauravrajsingh/
Thank you very much for your help^^
@Anonymous
it worked ?
Yes it worked^^ Thanks you
By the way, i need to show Week sales as following
In this case i need to calculate This week sale and last week sale.
would you help me Dax for those?
Thank you very much again.
Hi @Anonymous ,
Try this for LastweekSales
LastWeekSales =
Var ThisWeek = Max(WeekNum)
Return
calculate(sum(sales),WeekNum = ThisWeek - 1)
Regards,
Gaurav
It worked perfect^^😊😊😊😊
How about week to date /This week sale/??
Thank you, thank you...
@Anonymous
Try this :
ThisWeekToDate =
calculate(sum(sales),WeekNum = MAX(WeekNum))
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
26 | |
20 | |
19 | |
14 | |
13 |
User | Count |
---|---|
44 | |
36 | |
24 | |
24 | |
22 |