Forum Discussion
New column - value depends on another column
- 9 years ago
the number is still about 100 times higher than the number i am looking for.
That's ok, i'll just use constant lines.
cheers
Is it a simple case of swapping the order of the X and Y in the DIVIDE function?
eg use DIVIDE(y,x) ?
Ok thanks, close but still not the values i'm after. I think i might be going about it the wrong way.
To get the values I'm looking for I need to do the following:
120 / (The number of times "MCFA" occurs in the 'resource' column and at the same time "SICK" occurs in the 'detail' column)
120 / (The number of times "CAP" occurs in the 'resource' column and at the same time "SICK" occurs in the 'detail' column)
120 / (The number of times "FO" occurs in the 'resource' column and at the same time "SICK" occurs in the 'detail' column)
Ideally want these 3 things in the same Measure.
Thanks a lot
- Phil_Seamark9 years ago
Microsoft Employee
Could this be the tweak?
New Column = VAR StaffCol = 'Table1'[StaffNum] VAR X = CALCULATE(COUNTROWS('Table1'),
FILTER(
'Table1',
'Table1'[StaffNum] = StaffCol && 'Table1'[Detail] = "Sick"
)
) VAR Y = 120 RETURN DIVIDE(x,y)- michaelsparrow9 years ago
Helper I
the number is still about 100 times higher than the number i am looking for.
That's ok, i'll just use constant lines.
cheers