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.
Problem Statement: I am working with invoice data and want to categorize invoices based on their payment status as of specific dates. I would like to select a specific date from a Date dimension table and see how the situation looked at that particular moment. Additionally, I want to display how the payment status categories evolved over time.
Requirements:
Sample Data Structure: Here's a simplified example of the data:
InvoiceNumber | InvoiceDate | PaymentDate | InvoiceAmount | PaymentAmount |
1 | 01.01.23 | 15.03.23 | 100 | 50 |
2 | 15.02.23 | 10.04.23 | 200 | 200 |
3 | 15.03.23 | (null) | 150 | 0 |
Objective: I want to create a measure that takes into consideration the selected date from the Date dimension table and categorizes the invoices accordingly. For example, if the selected date is 31.03.23, the measure should consider only the payments made up to that date and ignore the future payments.
Categories:
I appreciate any insights or guidance on how to achieve this using DAX in Power BI. Feel free to provide a simplified solution if necessary.
Solved! Go to Solution.
@digicontrolling I hope this helps you. Thank You.
Max Date = MAX(Slicer Date) / Min Date = MIN(Slicer Date)
E.g
0-30 = calculate(
[Total Sales],
Filter(
ALL( Payments[Date] ),
Datediff ( Payments[Date]<[Max Date]/[Min Date] ) >=0
&&
Datediff ( Payments[Date]<[Max Date]/[Min Date] ) <31
)
)
@digicontrolling I hope this helps you. Thank You.
Max Date = MAX(Slicer Date) / Min Date = MIN(Slicer Date)
E.g
0-30 = calculate(
[Total Sales],
Filter(
ALL( Payments[Date] ),
Datediff ( Payments[Date]<[Max Date]/[Min Date] ) >=0
&&
Datediff ( Payments[Date]<[Max Date]/[Min Date] ) <31
)
)
User | Count |
---|---|
14 | |
10 | |
7 | |
6 | |
5 |
User | Count |
---|---|
30 | |
19 | |
12 | |
7 | |
5 |