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

how to calculate quantity*price both colum diff table

Hi team,
previous i have wrote query in sql server bellow
Select A.date,A.isin,(A.quintity * B.price) as amount from table1 A
inner join table2 B
ON A.date=B.date
and B.ISIN=B.ISIN
----------i got good reault_____
Now i got same table in excel how to i have fiz this
gate and isin column many to many relation


my question:
1.how to create datamodel in power bi desktop
2.what dax formal i need wrote calculating quantity * price

plase anybody help me.

thanks
shanvitha
4 REPLIES 4
jdbuchanan71
Super User
Super User

Hello @Anonymous 

For your first question, take a look at the free introduction to DAX from SQLBI.  https://www.sqlbi.com/p/introducing-dax-video-course/

Your total price calculation will be something along the lines of

Total Price =
SUMX ( 'Table A', 'Table A'[Quantity] * RELATED ( 'Table B'[Price] ) )

Nice, thank you @jdbuchanan71 

 

Also appreciate the added value with the vido course link!

Anonymous
Not applicable

Hi jdb,
I wrote dax formal but error
dosnt have a relationship to any table avaiabme in the current context.

my question how give relationship
date and isin columm availble in both table
i have try create relationship its many to many relationship showing my power bi desktop
and how to give two column relationship table
thanks
shantha

Hello @Anonymous You need to watch the Introduction to DAX video I linked, it will help.

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.