Forum Discussion
Error: Y-o-Y Calculation
Hi guys,
I would to create a table for showing the retail sales value and volume (like below), as well as the % change vs Sep 2021(Y-o-Y). However, I got some issues on Y-o-Y calculation.
| Date | Type of Outlets | Retail Sales Value($M) | Retail Sales value_% Change vs Sep 2021 | Volume Index | Volume Index_% Change vs Sep 2021 |
| Sep 2022 | All retail outlets | 28,072 | 0.20% | 96.7 | -1.50% |
For the retail sales value, volume index and volume_% Change vs 2021, they all come from the dataset and their data type are decimal number.
Therefore, I just need to set up a DAX formula for calculating the retail sales value vs Sep 2021(Y-o-Y).
However, the table showed some errors when I added the Volume Index and % Change vs Sep 2021 for Volume Index field into the table:
- Couldn't calculate the % change vs Sep 2021 of retail sales value
- There was an extra row with wrong figures.
h
Could anyone suggest some solutions to solve out the above problems?
Thank you.
5 Replies
- AnonymousNot applicable
Hi S-Learner ,
Although you have provided the dax formula and picture with the data, I am not familiar with the measures. How the measures calculate? Could you please provide your pbix file without privacy information and desired output with more details.
How to Get Your Question Answered Quickly
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- S-LearnerNew Member
Hi,
Thanks for your help! Please find the below pbix file and the raw data.
Actually, I would like to use Power PI to automate the the data processing and create the below table. The desire output should show the value & volume index, as well as their %Change vs. Sep 2021 (Y-o-Y) and %Change vs. Sep 2018. Please note that the % change of volume should refer to the raw data.
Thank you.
- AnonymousNot applicable
Hi S-Learner ,
I have created a simple sample, please refer to it to see if it helps you.
Create a measure.
Measure = var _1= EDATE(MAX('Retail Sales'[Date]),-12) var _2=CALCULATE(SUM('Retail Sales'[Value]),FILTER(ALL('Retail Sales'),'Retail Sales'[Type of Outlets]=SELECTEDVALUE('Retail Sales'[Type of Outlets])&&'Retail Sales'[Date]=_1)) return (MAX('Retail Sales'[Value])-_2)/_2Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.