cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How to calculate one measurevalue against other

Hi,

I have following table:

CostsIst_Value
Revenue2345
Material Costs117
Salary189
Rent378

 

I want to calculate ig. % of Material Cost based on Revenue

= ist_value / Revenue

 

My result should be following:

CostsIst_Value%Value
Revenue2345100%
Material Costs1174,90%
Salary1898,06%
Rent37816,12%

 

I try to extract the value for Cost=Revenue and use it for further calculation

Revenue =
CALCULATE(
SUMX(Table1,
Table1[Ist_Value]),
Table1[Costs] = "Revenue")
 
% Value =
DIVIDE(SUM(Table1[Ist_Value]),[Revenue])
 
But its always just showing % for Revenue:
CostsIst_ValueRevenue% Value
Revenue23452345100%
Material Costs117  
Salary189  
Rent378  

 

What am I doing wrong? 

1 ACCEPTED SOLUTION

Hi, @Anonymous 

In that case, the situation has been changed to me.

So, I need to write the measure again from the beginning.

Please try the below and let me know whether it works.

 

Revenue =
CALCULATE (
SUMX ( 'Table', 'Table'[Ist_Value] ),
FILTER ( ALL ( 'Table' [Cost]), 'Table'[Costs] = "Revenue" )
)

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: https://www.linkedin.com/in/jihwankim1975/

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

4 REPLIES 4
Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

 

I think it is related to your Revenue measure.

Please try to replace it to the below.

 

Revenue =
CALCULATE (
SUMX ( 'Table', 'Table'[Ist_Value] ),
FILTER ( ALL ( 'Table' ), 'Table'[Costs] = "Revenue" )
)

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: https://www.linkedin.com/in/jihwankim1975/

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Anonymous
Not applicable

Hi Jihwan Kim,

 

thanks for your reply.

It's almost correct.

Unfortunatly I wasn't 100% clear.

My original Table has also additionally a date inside:

(arggh I can't past Table)
Date   Costs  Ist_value

Jan     Revenue   2345

Jan    Material C   238

Feb    Revenue    5689

Feb    Material C  245

How can I still consider the date within Revenue calculation?

Right now with your approach it's taking total Sum of Revenue over whole table but it should be still grouped by date.

(sorry for not being accurate enough at the begining)

Hi, @Anonymous 

In that case, the situation has been changed to me.

So, I need to write the measure again from the beginning.

Please try the below and let me know whether it works.

 

Revenue =
CALCULATE (
SUMX ( 'Table', 'Table'[Ist_Value] ),
FILTER ( ALL ( 'Table' [Cost]), 'Table'[Costs] = "Revenue" )
)

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: https://www.linkedin.com/in/jihwankim1975/

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Anonymous
Not applicable

Hi @Jihwan_Kim ,

thanks for your help!

Its working.

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.

Top Solution Authors
Top Kudoed Authors