Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I have a "main table" with cases and their creation date and final status.
then I have a "change table" with the same cases and each change in status Old Status -> New Status and date on which it happened.
And of course I have a "calendar table" with all dates.
I need to calculate for each date in calendar how many cases were in each status.
Problem is that the "change table" does not have records in between status changes. Only the date for particular change.
Moreover, there can be several status changes in one day for one case. Only the last one is relevant.
I imagine the calculated result could be something like this.
I am interested in the Total rows. But how to get the '1's and count for each date and each status?
Can you please help?
Solved! Go to Solution.
Hi,
This post by SQLBI contains a good explanation on how to do this: https://www.sqlbi.com/blog/alberto/2011/03/08/thinking-in-dax-counting-products-in-the-current-statu...
Note that to use this DAX there can't be an active relationship between the calendar table and your fact table.
Data:
Dax:
I hope this helps and if it does consider accpeting this as a solution and giving the post a thumbs up!
Proud to be a Super User!
Hi,
This post by SQLBI contains a good explanation on how to do this: https://www.sqlbi.com/blog/alberto/2011/03/08/thinking-in-dax-counting-products-in-the-current-statu...
Note that to use this DAX there can't be an active relationship between the calendar table and your fact table.
Data:
Dax:
I hope this helps and if it does consider accpeting this as a solution and giving the post a thumbs up!
Proud to be a Super User!
Thank you, works very well!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
23 | |
10 | |
10 | |
9 | |
7 |