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 need to create a measure that sums only units ordered before a specific date. I then need to be able to put it in a table based on the invoiced date. The invoice date is the active relationship between my date table and fact table, and I have an inactive relationship between the date table and the ordered date. I've tried the following DAX but am getting no results (not an error - just a blank table). How can I modify this to get the sum of units only for orders placed before April 30th?
Invoiced Total Units before Increase = calculate(
SUM('Order Fact Table' [Units]),
datesbetween (
'Order Fact Table'[Ordered Date],
BLANK(),
04/30/2025 ))
Solved! Go to Solution.
Hi @Dave1mo1,
Thank you for reaching out to the Microsoft Fabric Forum Community.
And aslo Thanks to @ValtteriN & @lbendlin for Prompt and useful solution.
Try below Dax:
Invoiced Total Units before Increase =
CALCULATE(
SUM('Order Fact Table'[Units]),
'Date Table'[Date] < DATE(2025, 4, 30),
USERELATIONSHIP('Date Table'[Date], 'Order Fact Table'[Ordered Date])
)
Let us know if you need further assistance , we’re happy to help. If this addressed your query, please consider marking the response as an Accepted Solution so it can assist others in the community as well.
Thank you & Regards,
Prasanna kumar
Hi @Dave1mo1 ,
Just a gentle reminder has your issue been resolved? If so, we’d be grateful if you could mark the solution that worked as Accepted Solution, or feel free to share your own if you found a different fix.
This not only closes the loop on your query but also helps others in the community solve similar issues faster.
Thank you for your time and feedback!
Best,
Prasanna Kumar
Hi @Dave1mo1,
We wanted to kindly check in to see if everything is working as expected after trying the suggested solution. If there’s anything else we can assist with, please don’t hesitate to ask.
If the issue is resolved, we’d appreciate it if you could mark the helpful reply as Accepted Solution — it helps others who might face a similar issue.
Warm regards,
Prasanna Kumar
Hi @Dave1mo1,
Just following up to see if the solution provided was helpful in resolving your issue. Please feel free to let us know if you need any further assistance.
If the response addressed your query, kindly mark it as Accepted Solution and click Yes if you found it helpful — this will benefit others in the community as well.
Best regards,
Prasanna Kumar
Hi @Dave1mo1,
Thank you for reaching out to the Microsoft Fabric Forum Community.
And aslo Thanks to @ValtteriN & @lbendlin for Prompt and useful solution.
Try below Dax:
Invoiced Total Units before Increase =
CALCULATE(
SUM('Order Fact Table'[Units]),
'Date Table'[Date] < DATE(2025, 4, 30),
USERELATIONSHIP('Date Table'[Date], 'Order Fact Table'[Ordered Date])
)
Let us know if you need further assistance , we’re happy to help. If this addressed your query, please consider marking the response as an Accepted Solution so it can assist others in the community as well.
Thank you & Regards,
Prasanna kumar
Hi,
Here is one way to do this.
data:
Dax:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
Proud to be a Super User!
DATESBETWEEN requires a proper calendar table in your data model and does not work with BLANK() dates.
Invoiced Total Units before Increase = calculate(
SUM('Order Fact Table' [Units]),
'Order Fact Table'[Ordered Date] <= dt"2025-04-30")
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
12 | |
10 | |
6 |