Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Hi Team,
Need one help in formulating DAX query, Below is the sample data
| CARGO_SEQNO | Tendered_Date | Ship Date | Location Code |
| 2930617161 | 2021-05-04 | 2021-05-06 | 005 |
| 2930617855 | 2021-05-04 | 2021-05-11 | 005 |
| 2930518491 | 2021-05-06 | 2021-05-10 | 006 |
| 2930661353 | 2021-05-06 | 2021-05-12 | 005 |
| 2930661221 | 2021-05-06 | 2021-05-13 | 005 |
| 2930673655 | 2021-05-06 | 2021-05-07 | 007 |
| 2930661615 | 2021-05-07 | 2021-05-12 | 007 |
| 2930774479 | 2021-05-06 | 2021-05-16 | 006 |
| 2930727576 | 2021-05-08 | 2021-05-17 | 006 |
Requirement is to find the count of Cargo_Seqno that were Tendered prior to a given date but were shipped after that date from the same location code
For example using the below query i can get total 3 units tht were tendered prior to 9th May 2021 but were shipped after 9th May 2021 from location code 005
select count(distinct CARGO_SEQNO) As TenderedCount from SAMPLEDATA t where T.[LOCATION cODE]='005'
AND cast(t.Tendered_Date as date) < '2021-05-09' AND CAST(T.[Ship Date] AS DATE) >= '2021-05-09'
Other issue is i need to use above meassure and plot this numbers on below chart as Line values, here the shared axis is based on ship date and it shows the count of units tht were shipped on that particular day.
I am new to DAX, please advise.
Solved! Go to Solution.
Please see this article for how to do this.
Events in progress – DAX Patterns
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Thanks! for the link , the details provided helped to fix the isssue
Please see this article for how to do this.
Events in progress – DAX Patterns
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Thanks! for the link , the details provided helped to fix the isssue
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 23 | |
| 21 | |
| 17 | |
| 13 |
| User | Count |
|---|---|
| 58 | |
| 51 | |
| 39 | |
| 29 | |
| 24 |