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.
Hello everyone,
I'm currently facing an issue with a code that aims to find the maximum date among the consecutive preceding dates. Specifically, I want to retrieve the max date if the time difference in months between the current row and the previous row is exactly one. Unfortunately, I haven't been able to achieve the expected result despite my efforts.
It is important to note that sometimes there are two charges within the same month, with the same charge type and same tenant that I would like to count as one for this purpose.
I would greatly appreciate it if someone from the community could assist me with this matter. Thank you in advance for your help!
This is my code:
=
MAXX(
FILTER(
ALL('rx_Tenant_Unpaid_Charges'),
'rx_Tenant_Unpaid_Charges'[Tenant Code] = EARLIER('rx_Tenant_Unpaid_Charges'[Tenant Code])
&& 'rx_Tenant_Unpaid_Charges'[Charge Type] = EARLIER('rx_Tenant_Unpaid_Charges'[Charge Type])
&& rx_Tenant_Unpaid_Charges[Charge Type] = "HAPRent"
),
IF ( 'rx_Tenant_Unpaid_Charges'[PreviousDate] - EOMONTH(EARLIER('rx_Tenant_Unpaid_Charges'[PreviousDate]), 0) <= 1, 'rx_Tenant_Unpaid_Charges'[PreviousDate], BLANK() )
)
This is the result:
This is the expected result:
Hello guy s, does anyone have an idea?
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 |
---|---|
41 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
43 | |
35 | |
32 | |
18 | |
18 |