Forum Discussion
DAX calculation from two "sub" - tables
"C:\Users\priya\OneDrive\Sample File.pbix"
Hello,
I am trying to create a variable - 2600PPM which is a basically a division from two sub tables i created. I used the following DAX command -
Hi mallap849
If you cannot get amitchandak's to work, try to break it down one step further by creating two independent sum measures, followed by the divide. For example:
1. Sum 1 = SUM ( Table1[Column] )
2. Sum 2 = SUM ( Table2[Column] )
3. Divide = DIVIDE ( [Measure 1] , [Measure 2] , 0 )
Your output should be like below:
Importantly, ensure your column format is value (i.e. Whole Number / Decimal).
Hope this helps.
Theo
5 Replies
- amitchandakSuper User
mallap849 , The link you posted above will not work.
Yoir calculation should work across common dimesion
2600 PPM = Divide(SUM('VP-Warehouse Exp'[2600CC Exp]),SUM(Mileage[2600 Series]) )
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.- mallap849Helper I
"C:\Users\priya\OneDrive\Sample File.pbix"
Hi amitchandak ,
I have tried to reattach the file and I used the formula -
PPM 2600 = DIVIDE(SUM('Expense'[2600cc Exp]),SUM('Car Mileage Data'[2600 Series]))The syntax does not give an error but you can see that the value is not correct.Please let me know.Regards,Priyanka
- TheoCCommunity Champion
Hi mallap849
If you cannot get amitchandak's to work, try to break it down one step further by creating two independent sum measures, followed by the divide. For example:
1. Sum 1 = SUM ( Table1[Column] )
2. Sum 2 = SUM ( Table2[Column] )
3. Divide = DIVIDE ( [Measure 1] , [Measure 2] , 0 )
Your output should be like below:
Importantly, ensure your column format is value (i.e. Whole Number / Decimal).
Hope this helps.
Theo