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

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.

Reply
pbilearning
Helper I
Helper I

Can we create a line and clustered column chart for comparing current month with previous month?

Hey everyone!

 

I am trying to create a line and clustered column chart where  I want to display monthly gross quantity in clustered column and change in % of current month vs previous month (current month/previous month) as line chart in the same visualization. Can we do that?

 

Data is as below: (dates are from July 2018 to March,2020)

dates            grossquantity

July,1,2018    200

Aug,1,2018    400

Sep,1,2018     700

Oct,1,2018      920

 

2 ACCEPTED SOLUTIONS

Hi @pbilearning ,

 

check this out.

PBIX

 

https://docs.microsoft.com/en-us/power-bi/desktop-quick-measures

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


View solution in original post

MarcoPessina
Resolver IV
Resolver IV

Hi @pbilearning ,

you can try this measure:

 

% Gross Quantity Prev Month = CALCULATE(
VAR QuantityPrevMonth = CALCULATE(SUM('Table'[GrossQuantity]),PARALLELPERIOD('Table'[Date],-1,MONTH))
RETURN
DIVIDE(SUM('Table'[GrossQuantity])-QuantityPrevMonth,QuantityPrevMonth,0))
 
Hope it helps.
Cheers,
Marco

View solution in original post

4 REPLIES 4
v-xuding-msft
Community Support
Community Support

Hi @pbilearning ,

Do these answers make sense? If so, please mark the helpful answer as solution. More people will benefit here. Please feel free to ask us once you have any questions.

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-xuding-msft
Community Support
Community Support

Hi @pbilearning ,

The answers that pbilearning and mwegener are working perfectly. I just add a few blogs where you could learn more.

 

Month-over-Month calculation using DAX in Power BI 

Measures – Month to Month Percent Change 

 

For the visuals, maybe you could reference these:

Create and use combo charts in Power BI 

Line and Clustered Column Chart in Power BI 

 

If these can't help you, please share your expected results. We will understand clearly. Please feel free to ask the questions. 

 

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
MarcoPessina
Resolver IV
Resolver IV

Hi @pbilearning ,

you can try this measure:

 

% Gross Quantity Prev Month = CALCULATE(
VAR QuantityPrevMonth = CALCULATE(SUM('Table'[GrossQuantity]),PARALLELPERIOD('Table'[Date],-1,MONTH))
RETURN
DIVIDE(SUM('Table'[GrossQuantity])-QuantityPrevMonth,QuantityPrevMonth,0))
 
Hope it helps.
Cheers,
Marco

Hi @pbilearning ,

 

check this out.

PBIX

 

https://docs.microsoft.com/en-us/power-bi/desktop-quick-measures

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.