Forum Discussion
Divide 2 different columns from different tables and linked with 2 relations
- 8 years ago
Hi,
In your visual, drag week from the Datamaster table and factory from the Factories table. Then this measure should work
=SUM(Energy[KwH])/SUM(Volume[Volume])
If this does not help, then share the link from where i can download your file.
Hi,
In your visual, drag week from the Datamaster table and factory from the Factories table. Then this measure should work
=SUM(Energy[KwH])/SUM(Volume[Volume])
If this does not help, then share the link from where i can download your file.
Thx it works perfectly!:smileyhappy:
- Ashish_Mathur8 years ago
Super User
You are welcome.
- dhaval1001shah4 years agoRegular Visitor
Dear Mr. Ashish,
I need solution for given below:
Thank You.
Table 1
Table 2 Requirement Store ID Dis Amt Store ID Sales Store ID Dis % To Sales ABC 2 ABC 50 ABC 20%
ABC 4 BCD 2 ABC 4 BCD 6 DEF 4 DEF 2 - Ashish_Mathur4 years ago
Super User
Hi,
Create a third table with a single column which lists all unique Store ID's. Create a relationship (Many to One and Single) from the StoreID column of the 2 tables to the StoreID column of the third table. To your visual, drag StoreID from Table3. Write these measures:
Dis Amount = sum('Table1'[Dis Amt])
Total sales = sum('Table2'[Sales])
Dis% to sales = divide([Dis Amount],[Total sales])
Hope this helps.