Forum Discussion
DAX Formula for subtracting
So where is your TimeSpent measure coming from?
If you put your SLAHhrsSUM and TImeSpent into the values fields of the matrix does that not work? Then add an additional measure that subtracts one from the other?
Also how is Computer showing twice, is there something else differentiating the rows?
The Time Spent Measure comes from another place;
"view_tm_audit"
TimeSpent = [time_spent]/view_tm_audit[NumeratorSwitch]
NumeratorSwitch = SWITCH(view_tm_audit[time_spent_units_description],"Days",24,"Hours",1,"Minutes",60,"Second",60*60)
- This calc's correctly
The "Computer twice" is just two test jobs/cases ive rasied (screenshot has another one in it because
you could refer to those as "ClientA-Job1" and "ClientA-Job2"
"ClientA-Job1" - Labour Spent: 0.25
"ClientA-Job2" - Labour Spent: 2.50
Its just to make sure it can add time up correctly
When i add the "SLAMinus" in with it i get the following;
SLAHrsSUM = SUM(sla[SLA Hours])
SLAHrsMinusFromAllocated = (sla[SLAHrsCalculatedPerClient] - sla[SLAHrsSUM])
The one strange thing is i cant get 'sla[SLA Hours]' to appear with out converting it to a DAX calc first
if i could just minus from it directly, i think it would be fine! (Rather then suming it up)
ie: SLA_Minus = (sla[SLAHrsCalculatedPerClient] - sla[SLA Hours])