Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
AlexJB
Frequent Visitor

Change in percentage from month before

Hi, 

 

For a report we want to show qty's per month in a graph. We have quantities on Y-axis, months on X-axis and each line is a year. 

 

Now we want to show the change in quantities in percentage from the month before. Although I think I have a problem with the data.

 

I made example data, these are the actual columns I have. As you can see not every month has a quantity. This means when I just do a month - 1 formula I wont get all data because there is a possibility that product 202 has quantities in february but not in march so the formula won't find the data.

So I think I had to make a new table with a possible combinations of customer, product, year and month and then do a lookup for the quantities. If there is no quantity then show 0. 

The file is quite big (~400.000 lines of data), when I tried to make all possible combinations powerbi stops working.  Do you guys know some way to do this in powerbi or do I need to work with other programs to create the data I need (if it is needed)? Or is my computer just to slow.

 

Customer ProductYearMonthQty
DE12022018110
DE1202201824
DE1202201858
DE1202201866
DE12022018107
DE12022018118
DE12022018126
DE1202201915
DE12022019210
DE12022019312
DE12022019411
DE1202201956
DE1202201968
DE1202201977
DE12022019810
DE1202201991
DE12022019102
DE12022019112
DE120220191210
DE12032018110
DE12032018212
DE12032018311
DE12032018411
DE12032018710
DE1203201889
DE1203201898
DE12032018117
DE120320181210
DE12032019112
DE12032019211
DE1203201951
DE12032019610
DE12032019812
DE1203201991
DE12032019125
1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi, @AlexJB 

Import mode is not recommended if the data is very large. You can consider import the data into a database so that it can be accessed by using directquery.

Then you need a calendar table with consecutive dates and create measures based on this calendar table to calculate the result.

 

Best Regards,
Community Support Team _ Eason

View solution in original post

2 REPLIES 2
v-easonf-msft
Community Support
Community Support

Hi, @AlexJB 

Import mode is not recommended if the data is very large. You can consider import the data into a database so that it can be accessed by using directquery.

Then you need a calendar table with consecutive dates and create measures based on this calendar table to calculate the result.

 

Best Regards,
Community Support Team _ Eason

I indeed tought about this aswell. Although I wanted to see if there is any other way to do this. Thanks for the answer. 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.