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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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