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
Yes, you are right. We do not need to create a virtual Table. Thank you.
Hi Ashish ( Ashish_Mathur ),
i have another query based on a similar situation. What if i have multiple mode of payments catrgorised under these two Payment Categories. For example, my Table 1 and Table 2 will remain same. There wont be any changes. if i would have a 4th table as follows
Table No.4
Type of Payment Mode
Cash Payment Offline
Gift Card Offline
Cheque Payment Offline
Credit Card Online
Debit Card Online
UPI Online
Then my Table No.3 would revised as follows
- Ashish_Mathur7 years ago
Super User
Hi,
In Table 1 and Table 3 as well, you will have to clarify the Type of payment. If that information can be shared, then i can edit my solution to match your requirement.