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
dw700d
Post Patron
Post Patron

Dividing items within the same column

Good day all, I am pretty sure this is simple but I just cant figure it out. I  would like to create a measure that divides the sum of Version 1 by the sum of Version 2. How can I accomplish this?

 

Source      Amount   
Version 1      100
Version 1      150
Version 1      200
Version 1      250
version 2      320
version 2      290
version 2      500
version 2      610
1 ACCEPTED SOLUTION
manikumar34
Solution Sage
Solution Sage

@dw700d ,

Try the below.

DIVIDE(CALCULATE(sum(Table[Amount]),Table[Source] ="Version 1"),CALCULATE(sum(Table[Amount]), fTable[Source] ="Version 2"),0 )

 

Try not to use FILTER function which cuases the perfomrance issues.

 

Regards, 

Manikumar





If this helps, Appreciate your KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




View solution in original post

2 REPLIES 2
manikumar34
Solution Sage
Solution Sage

@dw700d ,

Try the below.

DIVIDE(CALCULATE(sum(Table[Amount]),Table[Source] ="Version 1"),CALCULATE(sum(Table[Amount]), fTable[Source] ="Version 2"),0 )

 

Try not to use FILTER function which cuases the perfomrance issues.

 

Regards, 

Manikumar





If this helps, Appreciate your KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




amitchandak
Super User
Super User

@dw700d , Please try a new measure

divide(calculate(sum(Table[Amount]), filter(Table, Table[Source] ="Version 1")),calculate(sum(Table[Amount]), filter(Table, Table[Source] ="Version 2")) )

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.