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 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
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 |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |