Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi
I am a newbe in DAX and i have a issue in figuring out how to correctly filter my data. This is the issue. I have a set of invoices that go through a set of steps during processing. in a day they can go through multiple steps. I am trying to figure out how many distinct invoices at a given day (selected by a user) i have in that day. I am using SSAS in direct query mode.
I can figure this out perfectly in SQL but in DAX i have not been able to figure this out.
This is the data set i use for testing
InvoiceNumber | ProcessStep | StartDate | EndDate | TimeOrder |
200 | Step 1 | 2020-03-30 | 2020-04-01 | 1 |
200 | Step 2 | 2020-04-01 | 2020-04-01 | 2 |
200 | Step 3 | 2020-04-01 | 2020-04-06 | 3 |
200 | Step 4 | 2020-04-07 | NULL | 4 |
300 | Step 1 | 2020-04-01 | 2020-04-01 | 1 |
300 | Step 2 | 2020-04-01 | 2020-04-04 | 2 |
300 | Step 3 | 2020-04-04 | 2020-04-06 | 3 |
300 | Step 4 | 2020-04-07 | 2020-04-09 | 4 |
300 | Step 3 | 2020-04-10 | NULL | 5 |
these are the results i get from my queries
InvoiceNumber | ProcessStep | StartDate | EndDate | TimeOrder |
200 | Step 3 | 2020-04-01 | 2020-04-06 | 3 |
300 | Step 3 | 2020-04-04 | 2020-04-06 | 3 |
ProcessStep | total |
Step 3 | 2 |
Below i have created a small sample script for SQL to show how i do this in sql.
Hi DarLove
Thx for the reply but this is not the solution and does not address the real issue. I have created a new issue as i realised my description did not make clear my problem.
Here is the new topic i created
Regards
Remond
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
7 | |
5 | |
4 | |
3 |
User | Count |
---|---|
12 | |
12 | |
10 | |
9 | |
9 |