Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Syndicate_Admin
Administrator
Administrator

Correction of Base of Credits and Quotas in Dax or Query

Good!
I need your help. The corresponding table comes from a server, which brings with it an error, because it is auto-loading. If a debtor pays arrears, this action doubles the receipt in the executed month and leaves the corresponding installment without receipt. In the example, installments 7 and 8 (Overdue) were subsequently paid alongside installments 11 and 12.
Additional data:

  • Quota receipt, counts the receipts of the corresponding table, related to an ID and Quota column.
  • Expired, consider whether the expiration date is past or not.
  • Situation, classifies the quota according to the following criteria: Grace, if Overdue=Yes and Amount=0; Mora, if Expired=Yes and Receipt=null; Paid, if I receive<>null; and Futura,if Defeated=No.
  • Current State considers the situation of the Credit if it accounts for any installment in Arrears.

IDQuotaExpirationAmountFee ReceiptExpiredQuota SituationCurrent Status
46115/4/2021$0 YesGraceNightmare
46215/5/2021$0 YesGraceNightmare
46315/8/2021$0 YesGraceNightmare
46415/9/2021$0 YesGraceNightmare
46515/10/2021$0 YesGraceNightmare
46615/11/2021$0 YesGraceNightmare
46715/10/2021$1.000 YesNightmareNightmare
46815/11/2021$1.000 YesNightmareNightmare
46915/12/2021$1.0001YesPaidNightmare
461015/1/2022$1.0001YesPaidNightmare
461115/2/2022$1.0002YesPaidNightmare
461215/3/2022$1.0002YesPaidNightmare
461315/4/2022$1.0001YesPaidNightmare
461415/5/2022$1.0001YesPaidNightmare
461515/6/2022$1.0001YesPaidNightmare
461615/7/2022$1.0001NoPaidNightmare
461715/8/2022$1.000 NoFutureNightmare
461815/9/2022$1.000 NoFutureNightmare
461915/10/2022$1.000 NoFutureNightmare
462015/11/2022$1.000 NoFutureNightmare
462115/12/2022$1.000 NoFutureNightmare
462215/1/2023$1.000 NoFutureNightmare

How could you correct, with Dax, the above?

Best regards

2 REPLIES 2
v-luwang-msft
Community Support
Community Support

Hi @Syndicate_Admin ,

If Quota Situation  what you want to get?

Test the below to create a new column:

testtest = IF('Table'[Expired]="Yes"&&'Table'[Amount]=0,"Grance",IF('Table'[Expired]="Yes"&&'Table'[Fee Receipt]=BLANK(),"Nightmare",IF('Table'[Fee Receipt]<>BLANK(),"Paid","Future")))

vluwangmsft_0-1662000388523.png

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards,
Lucien

Thanks for the reply, it's helpful. In the same way, it is not the one sought.
If you see, installments 11 and 12 have 2 receipts, they are duplicated. These two "others" correspond to the 7 and 8 respectively, which by not accounting for their receipts are in the situation of Mora. I know it's difficult but I ask here if there is any viable solution using DAX.

Thank you very much for your time and knowledge!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.