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.
Hello,
I am fairly new to DAX..
I have the table below...
It is basically a table of Company statuses. It has a start date when the status was set, and a end date when a status was changed. Once changed a new row gets entered with the new status.
I want to be able to get a running total of by day split by status, but when their is an end subtract from the old status, and add to the new status. It's been driving me up the wall. Anyone got any ideas?
Solved! Go to Solution.
Hi @Anonymous ,
Please create a Calendar table.
Calendar =
CALENDAR ( DATE ( 2022, 1, 1 ), DATE ( 2022, 12, 31 ) )
Then create measure.
CountCompany =
CALCULATE (
DISTINCTCOUNT ( 'Table'[CompanyName] ),
FILTER (
'Table',
'Table'[Start_Date] <= MAX ( 'Calendar'[Date] )
&& (
'Table'[END_DATE] >= MAX ( 'Calendar'[Date] )
|| 'Table'[END_DATE] = BLANK ()
)
)
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Please create a Calendar table.
Calendar =
CALENDAR ( DATE ( 2022, 1, 1 ), DATE ( 2022, 12, 31 ) )
Then create measure.
CountCompany =
CALCULATE (
DISTINCTCOUNT ( 'Table'[CompanyName] ),
FILTER (
'Table',
'Table'[Start_Date] <= MAX ( 'Calendar'[Date] )
&& (
'Table'[END_DATE] >= MAX ( 'Calendar'[Date] )
|| 'Table'[END_DATE] = BLANK ()
)
)
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello,
Yes i used parts of your Measure, and it worked as intended.
Thank you for the help.
Thanks
Chris
@Anonymous
you might find the solutions provided in this post helpful https://community.powerbi.com/t5/DAX-Commands-and-Tips/Count-Open-Orders-with-missing-date-records/m-p/2500258#M69112
Hi @Anonymous
can you provide some sample data?
User | Count |
---|---|
50 | |
44 | |
18 | |
14 | |
14 |
User | Count |
---|---|
107 | |
58 | |
29 | |
21 | |
16 |