Forum Discussion
Subtotal row
hello good, first congratulations on moving the forum here,
I hope you can help me: I have to make a accumulator
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):
CALCULATE(DISTINCTCOUNT('FORMACION'[Employee number]);
FILTER(ALLSELECTED('Date Master'[DATE]);
MAX('Date Master'[DATE]);-12; MONTH))))
This gives us this image:
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
- Greg_DecklerCommunity Champion
Not entirely sure I follow, but maybe a measure totals problem? Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907 - v-zhenbw-msftCommunity Support
Hi Anonymous ,
We can use the following steps to meet your requirement.
1. Create a table that contains medida name, min value and max value.
2. Create a measure that defines if value is greater than the minR and less than the maxR, then count rows the table. You can replace it with your calculation logic.
Measure = IF(SUM('Table'[time]) >= MIN('Table (2)'[MinR]) && SUM('Table'[time]) <= MAX('Table (2)'[MaxR]),COUNTROWS('Table'),BLANK())We put the Name in Rows, Date in column and measure in values. The result like this,
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that we have shared?
BTW, pbix as attached.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
Thank you very much I think that the solution can be found by there, attached the excel to make it more comfortable.
I haven't put it on, but I have created a calendar table.
Greetings.
https://drive.google.com/file/d/1bsk4INrJyMQfkfben9W1E_2rCz7SjTGS/view?usp=sharing