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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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 - 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

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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