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.
Thx it works perfectly!:smileyhappy:
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.
- dhaval1001shah4 years agoRegular Visitor
Dear Mr. Ashish,
Thank yoi for your reply.
However, i am not able to get % when i select ABC from my store ID list. Over all it gets tally when i divide total discount with total sales.
However when i select store ID ABC then i must get 20% (ABC dis amt is 10 and Sales is 50 = 20%). But i am not getting the same.
Kindly help.
I followed all steps which you given above.
Thank You.
Regards
CA Dhaval Shah