Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I want to know if receivables is open or not.
I have been inspired a lot by: https://community.powerbi.com/t5/Desktop/Dynamic-Accounts-Receivable-Aging/td-p/304192
but I have some additional columns I needed to account for. So I have written the formala as:
OpenAmount =
VAR SelectedDate =
IF ( HASONEVALUE ( 'Indicator'[Date] ); VALUES ( 'Indicator'[Date] ); BLANK () )
RETURN
IF (
max('Receivables'[Document_date]) <= SelectedDate
&& (min('Receivables'[Clearing_date]) > SelectedDate || min('Receivables'[Clearing_date]) = BLANK())
&& SelectedDate <> BLANK();
[Amount];
BLANK ()
)
That works - it doens't give me the total amount, and furthermore I need to rewrite it into an expression without variables as I have to push it to an analysis services instance that does not support that feature yet.
I tried to rewrite it to:
Calculateopen =
CALCULATE (
[Amount];
FILTER (
VALUES ( Indicator[Date] );
MAX ( 'Receivables'[Document_date] ) <= 'Indicator'[Date]
&& MIN ( 'Receivables'[Clearing_date] ) > 'Indicator'[Date]
)
)
But that doesn't work at all. Indicator table is a data table, but it is not connected to other tables.
Solved! Go to Solution.
Seems like you are trying to do something similar to my Open Tickets Quick Measure here:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Open-Tickets/m-p/409364
That being said, what about this:
IF ( max('Receivables'[Document_date]) <= IF ( HASONEVALUE ( 'Indicator'[Date] ); VALUES ( 'Indicator'[Date] ); BLANK () ) && (min('Receivables'[Clearing_date]) > IF ( HASONEVALUE ( 'Indicator'[Date] ); VALUES ( 'Indicator'[Date] ); BLANK () ) || min('Receivables'[Clearing_date]) = BLANK()) && IF ( HASONEVALUE ( 'Indicator'[Date] ); VALUES ( 'Indicator'[Date] ); BLANK () ) <> BLANK(); [Amount]; BLANK () )
Seems like you are trying to do something similar to my Open Tickets Quick Measure here:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Open-Tickets/m-p/409364
That being said, what about this:
IF ( max('Receivables'[Document_date]) <= IF ( HASONEVALUE ( 'Indicator'[Date] ); VALUES ( 'Indicator'[Date] ); BLANK () ) && (min('Receivables'[Clearing_date]) > IF ( HASONEVALUE ( 'Indicator'[Date] ); VALUES ( 'Indicator'[Date] ); BLANK () ) || min('Receivables'[Clearing_date]) = BLANK()) && IF ( HASONEVALUE ( 'Indicator'[Date] ); VALUES ( 'Indicator'[Date] ); BLANK () ) <> BLANK(); [Amount]; BLANK () )
Hi Greg,
Thanks a lot - that works 🙂 It does however not return a grand total, do you have any ideas for that also?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
98 | |
81 | |
65 | |
62 |
User | Count |
---|---|
147 | |
116 | |
104 | |
88 | |
65 |