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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Midguel
Helper I
Helper I

create measure to represent the percentage of a category divided by a category of the same column

Hi, I'm trying to represent in a graphic a line value that shows the percentage of the sum of one category divided by another, my X axis is divided by Date, my series are the 2 values of the category column, and the values for the graphic are the Sum of the production. here's  the graphic:

graphic.PNG

for example in 2020 july the line values should be around 7503 / 24864 = 30.17%, and so on for the next months.

If anyone can help me with this, I'll be very much appreciatte. Thanks!!!

1 REPLY 1
nandic
Memorable Member
Memorable Member

Hi @Midguel ,
Attached demo file.

Result:

 

Measure line chart.PNG

 


DAX code for line measure:

Measure Line =
var _Heavy = CALCULATE(SUM('Table'[Amount]),FILTER('Table','Table'[Category]="Heavy"))
var _Turbo = CALCULATE(SUM('Table'[Amount]),FILTER('Table','Table'[Category]="Turbo"))
RETURN
DIVIDE(_Heavy,_Turbo)
 
Regards,
Nemanja Andic



 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors