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
Anonymous
Not applicable

Multiply measure with a cloumn

Hi all,

 

This is related to if there is a way to multiple value of  a measure to a column. I have cost in either euor or pound and I want all of them to be converted into pound. First I have to divide cost by a million and then multiply by currency rate. And I have currency rate coming from database for each row. 

 

Image.png

If I create currency rate as a measure then results are wrong. So I had to create a calculated column with all of the calulations and then create a measure which is equal to sum(calculated column). But I am looking for a better and effective way to do it.  

 

 

8 REPLIES 8
Greg_Deckler
Super User
Super User

Sample data and formulas please.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler

 

Here is the sample dataset image2.png

 

Hi @Anonymous,

 

Did you mean this?

 

Measure:

Final Cost =
CALCULATE ( MAX ( Tab[cost] ) ) / 1000000
    * CALCULATE ( MAX ( Tab[currency_rate] ) )

1.PNG

 

Thanks,
Xi Jin.

Simple one... hope the solution is marked....

Anonymous
Not applicable

@v-xjiin-msft

 

Why did you use MAX in the calculation? When I tried using this formula in my original dataset I din't get the desired results. 

Hi @Anonymous,

 

Because I'm using a measure. Measure cannot call the table column directly. 

 

As you said it didn't work for you. Could you please share us some detailed screenshots about your wrong results?

 

Thanks,
Xi Jin.

Anonymous
Not applicable

@v-xjiin-msft

b124c7bce1da3db7b0610dbd14e5dc60.png

 I should be geteing same values a spend column rather I am getting values in final cost

 

 

Hi @Anonymous,

 

Sorry but I don't quite understand about your screenshot and your description.

 

Sicne the finalcost formula is Adjusted Cost/Currency Rate and the formula of Adjusted Cost is Cost (Spend ?)/1000000. So the final formula shoule be Cost (Spend ?)/1000000/Currency Rate. Right?

 

Then what does "getting same values as spend column"?

 

Thanks,
Xi Jin.

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.