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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
mwegener
Most Valuable Professional
Most Valuable Professional

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 - Power BI Tutorials


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
mwegener
Most Valuable Professional
Most Valuable Professional

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 - Power BI Tutorials


Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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