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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.