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
aovalle91
New Member

Measure to calculate each row

I have two tables that are not related. One has the trasaction amount (Table 1) and the other has the factor (Table 2) aplies for an origin currency and a destiny currency. The problem is that i made a measure (Amount Currency) that calculate the amount multiplied to the factor according to origin currency in the transaction table (LC in Table 1) and the destiny currency that is selected by the user (DC) and it work when its in a table with all the details (Table 3) but when its not detailed doesnt work (Table 4).

image.pngimage.png

1 ACCEPTED SOLUTION

Then you will need to read this article and see if you can create a virtual relationship. Or talk to the person that manages your SSAS and ask them to create a relationship for you at the source. That is really what should be done.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

3 REPLIES 3
edhans
Super User
Super User

A couple of things:

  1. The tables have to be related for any of this to work. You need to relate the LC field in table 1 to the LC field in table 2.
  2. Use this measure and put it in table 1. (doesn't matter where you put it really, but it wouldn't make much sense in table 2 logically.
Amount Currency Type = 
    SUMX(
        Table1,
        Table1[Amount]* RELATED(Table2[FC])
    )

That will show in your "Table 4" above, which I think is really a visual and not a table.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

I cant make the relationship, because this is an example of an Analysis Services conection to power BI and i cant change the AS

Then you will need to read this article and see if you can create a virtual relationship. Or talk to the person that manages your SSAS and ask them to create a relationship for you at the source. That is really what should be done.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

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.