Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Dear Friends,
I am trying to make cumulative totals of HR database where the employees during the time change their grades, salaries and cost center and this should be reflected in the cumulative totals over time but still count as one employee. For example for employee 100044 I should have it in cumulative total as 1 and not 5 but I for example if I want to present Cost center headcount breakdown this particular employees will be until 01 April 2018 on CC-2 but after this date it should be on CC-16 and not double.
I have attached the file https://drive.google.com/file/d/1w2yhvbOX2FbMmoHa-21UkEdLd2XqYS23/view?usp=sharing
Thank you very much in advance.
Solved! Go to Solution.
@ngrulovic Thanks for the sample file.
I used method described here: https://excelwithallison.blogspot.com/2020/06/dax-approximate-lookup.html
And I also replaced your Date table with one that has Month number for correct sorting: https://excelwithallison.blogspot.com/2020/04/dimdate-what-why-and-how.html
If I understand correctly, I think this is what you're after:
I created a calculated column:
and a measure:
For your example Employee ID = 100044:
See sample file attached below signature.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Dear Alisson,
This is it! Thank you very much!
You're welcome!
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@ngrulovic Thanks for the sample file.
I used method described here: https://excelwithallison.blogspot.com/2020/06/dax-approximate-lookup.html
And I also replaced your Date table with one that has Month number for correct sorting: https://excelwithallison.blogspot.com/2020/04/dimdate-what-why-and-how.html
If I understand correctly, I think this is what you're after:
I created a calculated column:
and a measure:
For your example Employee ID = 100044:
See sample file attached below signature.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
User | Count |
---|---|
84 | |
80 | |
72 | |
71 | |
55 |
User | Count |
---|---|
108 | |
106 | |
93 | |
85 | |
67 |