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


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
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors