Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good Morning,
Could someone help, I think I have something wrong.
I have created the following:
Sum({$<Year={$(=Max(Year))}>} SUM([Crew])
-
Sum({<[Accident Category]={'Total Recordable Cases (TRC)'}>}[Crew])
-
Sum({<[Accident Category]={'Lost Time Injuries (LTI)'}>}[Crew]))
I want to get the total of Crew for the current year minus the totals of TRC and LTI.
But it is not working, anyone see why?
Thanks
may be like this
Sum({$<Year={$(=Max(Year))}>} [Crew])
-
Sum({<[Accident Category]={'Total Recordable Cases (TRC)'}>}[Crew])
-
Sum({<[Accident Category]={'Lost Time Injuries (LTI)'}>}[Crew]))
May be this:
RangeSum(Sum({$<Year={$(=Max(Year))}>} Crew), -Sum({<[Accident Category] = {'Total Recordable Cases (TRC)', 'Lost Time Injuries (LTI)'}>} Crew))
may be like this?
=((Sum({$<Year={'=$(=Max(Year))'}>} [Crew])
-
Sum({<[Accident Category]={'Total Recordable Cases (TRC)'}>} [Crew]))
-
Sum({<[Accident Category]={'Lost Time Injuries (LTI)'}>} [Crew]))
Even you can do like this:
=(Sum({$<Year={'=$(=Max(Year))'}>} [Crew])
-
Sum({<[Accident Category]={'Total Recordable Cases (TRC)','Lost Time Injuries (LTI)'}>} [Crew]))
Thanks, but none of those are giving the correct answer.
I am not sure if the first year selection is then applying to the following sums?
Hi Daniel,
It would be very easy doing it with a master calander.
Just making use of the inyeartodate() dunction will solve your issue, other wise Sunny's solution should work.
Thanks and Regards,
Sangram Reddy.
Hi,
I think you need bracket for the last 2 expression. Meaning the last 2 expression calculation takes place first and then the first expression
Sum({$<Year={$(=Max(Year))}>} [Crew])
-
(Sum({<[Accident Category]={'Total Recordable Cases (TRC)'}>}[Crew])
-
Sum({<[Accident Category]={'Lost Time Injuries (LTI)'}>}[Crew]))