Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.