Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Subtotal row

hello good, first congratulations on moving the forum here,
I hope you can help me: I have to make a accumulator

accumulated
CALCULATE(
SUM('FORMACION'[Course Hours]);
FILTER(
ALLSELECTED('Date Master'[DATE]);
'Date Master'[DATE] in DATESINPERIOD('Date Master'[DATE]; MAX('Date Master'[DATE]);-12; MONTH MONTH
)))


and about that accumulated say that users have x hours greater or less hours I have tried with a measure (surely it is not the best way and that is why I am here):

Measurement 0-8 ? IF([accumulated]>-9; BLANK();
CALCULATE(DISTINCTCOUNT('FORMACION'[Employee number]);
FILTER(ALLSELECTED('Date Master'[DATE]);
'Date Master'[DATE] in DATESINPERIOD('Date Master'[DATE];
MAX('Date Master'[DATE]);-12; MONTH))))

This gives us this image:

Screenshot_1.png

The conclusion that I take out is that when I add more than 8 the total applies what I have put to the if and blanks it.
My final idea is to remove the user numbers to leave it to a measure that I accumulate only those who are under 8
between 8 and 16 , 16 and 24, 24 and 32 and +32.
as I said do it in several measures I'm sure it's not the right thing to do and the best thing is surely a calculated column but I don't know how to do it either.

Thanks a lot

3 Replies