Forum Discussion
Create a calculation based on two tables
- 7 years ago
Hi FuzzyYabs
Please check the measures in attachment.
AC Power Rate = DIVIDE ( CALCULATE ( SUM ( Individual[Amount] ), Individual[Department] = "AC POWER" ), CALCULATE ( SUM ( Total[Total] ), FILTER ( ALL ( Total ), Total[Department Total] = "AC POWER" && Total[Date] <> "NOV C18" ) ) )Regards,
Cherie
Hello v-cherch-msft ,
here's a Sample file.
There are two datasets. Individual and Total.
The need is to create a third table, which will have the computation as below.
Hi FuzzyYabs
Please check the measures in attachment.
AC Power Rate =
DIVIDE (
CALCULATE ( SUM ( Individual[Amount] ), Individual[Department] = "AC POWER" ),
CALCULATE (
SUM ( Total[Total] ),
FILTER (
ALL ( Total ),
Total[Department Total] = "AC POWER"
&& Total[Date] <> "NOV C18"
)
)
)
Regards,
Cherie
- FuzzyYabs7 years agoFrequent Visitor
Almost! haha however, how am I suppose to make the calculation such that the totals will only be for a selected date range? ex. the total should be the sum from Nov 2017 - Oct 2018???
Apologies for having to many questions about this and thank you for helping me on this.
- v-cherch-msft7 years agoMicrosoft Employee
Hi FuzzyYabs
What is a selected date range? You want to add a slicer to get the dynamic date range?If so,you may refer to below post to get the last 12 month values from selected month.
Regards,
Cherie
- FuzzyYabs7 years agoFrequent Visitor
Hello v-cherch-msft
Your samples are very helpful. I will look into your suggestions. Thank you so much!