Forum Discussion
Dax Measure with related Table
- 7 years ago
Hi coolshib,
Please establish a relationship between 3 tables and try the following measure for
Total Sales =SUMX(Table3,IF(Table3[Mode]="Online",RELATED(Table1[Online Price]),RELATED(Table1[Offline Price]))*Table3[Qty])
Here is the snapshot of the output
You can download the Power Pivot file from here
Hope it helps
- 7 years ago
- Ronald1237 years ago
Resolver III
Hi Ashish_Mathur,
Why the SUMX formule >
Total sales = SUMX(SUMMARIZE(Table1;Products[Product Name];'Mode of payment'[Mode];"ABCD";[Price per unit]*[Quantity sold]);[ABCD])If this formule give the same results.
Total Sales2 = [Quantity sold]*[Price per unit]
Greets,
Ronald
- Ashish_Mathur7 years ago
Super User
Hi,
Your measure would give the correct row wise totals but the incorrect grand total.
- Ronald1237 years ago
Resolver III
Hi Ashish_Mathur,
This one gives me also the correct grand total.Total sales = SUMX(Table1;[Price per unit]*[Quantity sold])
I will understand wy to generate a virtual table with summarize.
Greets,
Ronald
- coolshib7 years ago
Helper III
Thank you so much.. Great Help.
Best Regards
Shib
- Ashish_Mathur7 years ago
Super User
Hi,
If my reply helped, please mark it as Answer.