Forum Discussion
Help Needed: DAX Formula for Calculating 10-Day Rolling Percentage Change in Power BI
- Anonymous2 years ago
Hi @AT150745,
I was able to use your formula in my testing to show values from the 31st to previous dates.
The columns in the matrix are the formatted calculated columns in /Dimension Time/ table.
TSS PW 10D is a value in the Category column of the Dimension Time table.
Could you provide the relevant data (pbix files) to facilitate my further testing?
Best Regards,Dengliang Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- 2 years ago
Hi,
I need assistance with calculating the percentage change between sales or values for the current week and the previous week in Power BI. I also need to ensure that I can display values for the next 10 days based on a filter.
Here's what I would like to achieve:
Calculate Percentage Change: I want to calculate the percentage change between sales or values for the current week and the previous week. The calculation should compare values for the same day of each week.
Display Values for Next 10 Days: The report should be able to show values for the next 10 days from the selected date filter.
Could you please provide guidance or a DAX formula that will help me accomplish this?
Thank you in advance for your help!
Best regards,
Dengliang Li - Anonymous2 years ago
Hi @AT150745,
You can use the first DAX formula in your posted question to implement the calculation of the percentage change between the current week's and the previous week's sales or values.M_TSS_7D_PW% = VAR __PREV = CALCULATE( SUM('Fact Sales Daily 7D'[Gross Sale 7D]), DATEADD('Dimension Time'[Date], -7, DAY) ) RETURN DIVIDE( SUM('Fact Sales Daily 7D'[Gross Sale 7D]) - __PREV, __PREV )You can use the filter's Relative Date to display values for how many days in the future from today.
Best Regards,
Dengliang Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @AT150745,
I was able to use your formula in my testing to show values from the 31st to previous dates.
The columns in the matrix are the formatted calculated columns in /Dimension Time/ table.
TSS PW 10D is a value in the Category column of the Dimension Time table.
Could you provide the relevant data (pbix files) to facilitate my further testing?
Best Regards,
Dengliang Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
I need assistance with calculating the percentage change between sales or values for the current week and the previous week in Power BI. I also need to ensure that I can display values for the next 10 days based on a filter.
Here's what I would like to achieve:
Calculate Percentage Change: I want to calculate the percentage change between sales or values for the current week and the previous week. The calculation should compare values for the same day of each week.
Display Values for Next 10 Days: The report should be able to show values for the next 10 days from the selected date filter.
Could you please provide guidance or a DAX formula that will help me accomplish this?
Thank you in advance for your help!
Best regards,
Dengliang Li
- Anonymous2 years agoNot applicable
Hi @AT150745,
You can use the first DAX formula in your posted question to implement the calculation of the percentage change between the current week's and the previous week's sales or values.M_TSS_7D_PW% = VAR __PREV = CALCULATE( SUM('Fact Sales Daily 7D'[Gross Sale 7D]), DATEADD('Dimension Time'[Date], -7, DAY) ) RETURN DIVIDE( SUM('Fact Sales Daily 7D'[Gross Sale 7D]) - __PREV, __PREV )You can use the filter's Relative Date to display values for how many days in the future from today.
Best Regards,
Dengliang Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.