Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
10 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
13 | |
12 | |
11 | |
8 |