March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Solved! Go to Solution.
Hi @bonjourposte
Can you please check the below DAX, please let me know if not works
NumRenewals2 =
VAR MatDate = MAX(LOANHISTSorted[MAT_DATE])
VAR CurrentLoanStatus = MAX(LOANHISTSorted[LOAN_STATUS])
VAR CurrentLoanTerm = MAX(LOANHISTSorted[CURR_LOAN_TERM])
VAR CurrentAmzMos = MAX(LOANHISTSorted[CURR_AMZ_MONTHS])
VAR PREV_MAT_DATE = MAX(LOANHISTSorted[PREV_MAT_DATE])
VAR PREV_LOAN_STATUS = MAX(LOANHISTSorted[PREV_LOAN_STATUS])
VAR PREV_LOAN_TERM = MAX(LOANHISTSorted[PREV_LOAN_TERM])
VAR PREV_AMZ_MOS = MAX(LOANHISTSorted[PREV_AMZ_MONTHS])
VAR PREV_START_DATE = MAX(LOANHISTSorted[PREV_START_DATE])
RETURN
CALCULATE(
COUNTROWS(LOANHISTSorted),
FILTER(
LOANHISTSorted,
MatDate <> PREV_MAT_DATE &&
CurrentLoanStatus <> "Commitment" &&
PREV_LOAN_STATUS <> "Cancelled" &&
PREV_LOAN_STATUS <> "PAIDINFULL" &&
(
(PREV_START_DATE > MatDate) ||
(PREV_LOAN_TERM <> CurrentLoanTerm && PREV_AMZ_MOS = CurrentAmzMos)
)
)
)
Proud to be a Super User! | |
Hi @bonjourposte
Can you please check the below DAX, please let me know if not works
NumRenewals2 =
VAR MatDate = MAX(LOANHISTSorted[MAT_DATE])
VAR CurrentLoanStatus = MAX(LOANHISTSorted[LOAN_STATUS])
VAR CurrentLoanTerm = MAX(LOANHISTSorted[CURR_LOAN_TERM])
VAR CurrentAmzMos = MAX(LOANHISTSorted[CURR_AMZ_MONTHS])
VAR PREV_MAT_DATE = MAX(LOANHISTSorted[PREV_MAT_DATE])
VAR PREV_LOAN_STATUS = MAX(LOANHISTSorted[PREV_LOAN_STATUS])
VAR PREV_LOAN_TERM = MAX(LOANHISTSorted[PREV_LOAN_TERM])
VAR PREV_AMZ_MOS = MAX(LOANHISTSorted[PREV_AMZ_MONTHS])
VAR PREV_START_DATE = MAX(LOANHISTSorted[PREV_START_DATE])
RETURN
CALCULATE(
COUNTROWS(LOANHISTSorted),
FILTER(
LOANHISTSorted,
MatDate <> PREV_MAT_DATE &&
CurrentLoanStatus <> "Commitment" &&
PREV_LOAN_STATUS <> "Cancelled" &&
PREV_LOAN_STATUS <> "PAIDINFULL" &&
(
(PREV_START_DATE > MatDate) ||
(PREV_LOAN_TERM <> CurrentLoanTerm && PREV_AMZ_MOS = CurrentAmzMos)
)
)
)
Proud to be a Super User! | |
Hi @PijushRoy , I got it to work! Thanks for your help.
NumRenewals =
VAR MatDate = MAX(LOANHISTSorted[MAT_DATE])
VAR PREV_START_DATE = MAX(LOANHISTSorted[PREV_START_DATE])
VAR CurrentLoanStatus = MAX(LOANHISTSorted[LOAN_STATUS])
RETURN
CALCULATE(
COUNTROWS(LOANHISTSorted),
FILTER(
LOANHISTSorted,
LOANHISTSorted[MAT_DATE] <> LOANHISTSorted[PREV_MAT_DATE] &&
CurrentLoanStatus <> "Commitment" &&
LOANHISTSorted[PREV_LOAN_STATUS] <> "Cancelled" &&
LOANHISTSorted[PREV_LOAN_STATUS] <> "PAIDINFULL" &&
LOANHISTSorted[CURR_START_DATE] > LOANHISTSorted[PREV_MAT_DATE])
Thanks, it didn't work, but it's the closest I've gotten.
I took out the line about Extensions because I'll do the Extensions in another matrix. This one will just be Renewals.
It should look like the first matrix, but it gives me the second one.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
165 | |
116 | |
63 | |
57 | |
50 |