cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

calculating two measures

Hi, I have a measure  e.g. measuresTable[Pool_Total] which calculates sales for a country. the result is something like 1743.49

 

here's measure:

 

Pool_Total = 

CALCULATE (

  SUMX (

    FILTER(

      salesTable,

       salesTable[Country] = "US"

    ),

    salesTable[AmountItem]

  )

  * .01

)

 

 

I also have a measure in a different visual where I assign a percentage e.g. myTable[Pct]

here's the measure:

 

Pct = DIVIDE(SUM(myTable[rank]), 100)

 

An example value for this is:  0.02

 

I'm trying to sum the results of the two measures and display in a column e.g. shareValue.

here's the column:

 

shareValue = myTable[Pool_Total] * [Pct]

 

the result is 2.00 unlike what I expect  e.g. 1743.49 * 0.02 = 34.87

 

Can somepone point me to a possible fix, I think I misunderstand the complexity involved in the calculation.

 

thank you !

 

 

 

4 REPLIES 4
Highlighted
Super User II
Super User II

Re: calculating two measures

Is there a relationship between myTable and salesTable ?

the two measures may be executing in a different context

it looks like Pool_total is operating in a row that has an item defined... are there different items that all have different totals ?

without knowing how salesTable relates to myTable it's hard to say much

could you post and past in some sample data for both tables ?





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


Highlighted
Super User IV
Super User IV

Re: calculating two measures

Hi,

Share the link from where i can download your PBI file and clearly show the problem there.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Highlighted
Super User IV
Super User IV

Re: calculating two measures

@CoreyL 

Multiplication should ideally be sum(A*B)

From multiple tables, it needs a row context, preferably a common dimension

 

sum(summarize(Dimension,Dimension[Name],"_1",[Pool_Total],"_2", [Pct]),[_1]*[_2])

Refer: the importance of row context : https://community.powerbi.com/t5/Community-Blog/Decoding-Direct-Query-in-Power-BI-Part-2-Date-Differ...

 

 if you need more help make me @

Appreciate your Kudos.

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

Highlighted
Frequent Visitor

Re: calculating two measures

Hi, thanks for response. I was able to get a demo working, I will provide it here for benefit of community. thanks again!

 

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors