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
Tycobb479
New Member

Historical line chart

Hello dear collaborators!
I'd like to kindly ask for your help regarding the following: I have the below information and I would like to calculate the subtotals for A and B and then divide [(subtotal A) / (subtotal B)] to get the values per month (the highlighted table), as my aim is to plot these monthly values in a line chart to visualize the trend. The first criteria will be to filter the info out by date (month), but I also have some codes associated to more slicers. I have tried to work this out with no success (I'm quite new using PowerBi). Is there anyone that can guide me to solve this problem? Thanks in advance!

 

PowerBI question.PNG

2 ACCEPTED SOLUTIONS
dcrow5378
Helper II
Helper II

You can achieve this by rolling up the date to year month format, then creating a measure to perform the calculation:

dcrow5378_0-1659991089805.png

 

 

View solution in original post

MahyarTF
Memorable Member
Memorable Member

Hi,

You could create the Month-Num column in your table as below :

Month-Num = format(Sheet81[Date], "MM")
And also 
Value = DIVIDE( sum(Sheet81[A]), sum(Sheet81[B] ))
then use the created column in your visuals :
MahyarTF_0-1660024993338.png
Mahyartf

View solution in original post

4 REPLIES 4
MahyarTF
Memorable Member
Memorable Member

Hi,

You could create the Month-Num column in your table as below :

Month-Num = format(Sheet81[Date], "MM")
And also 
Value = DIVIDE( sum(Sheet81[A]), sum(Sheet81[B] ))
then use the created column in your visuals :
MahyarTF_0-1660024993338.png
Mahyartf

Thank you for your alternative solution, MahyarTF! Much appreciatted!

dcrow5378
Helper II
Helper II

You can achieve this by rolling up the date to year month format, then creating a measure to perform the calculation:

dcrow5378_0-1659991089805.png

 

 

Thank you for your fast reply, dcrow5378!

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.