Forum Discussion
kalkhudary
Helper IV
2 years agoMultiple Filters from multiple tables with a VAR
Hello Community, I have a tricky problem that I am trying to solve related to a DAX. I have daxed the below to calculate the distinct count of claims based on 3 conditions and summing them at th...
some_bih
Community Champion
2 years agoHi kalkhudary there is part "Condition3" but no definition in VAR part.
Hope this help, kudos appreciated.
- kalkhudary2 years ago
Helper IV
Hello some_bih Apologies, I missed it but orginally it was in my DAX but still giving me an error. Can you check the daxing for me.
#Claims - <100$ =VAR Condition1= CALCULATE(DISTINCTCOUNT(claim[Claim]),FILTER(claim, claim[Total Employee payment Value])<100,FILTER(paymentbatchtable, paymentbatchtable[Payment file generated] = "Yes" && paymentbatchtable[Payment Batch] = SELECTEDVALUE(paymentbatchtable[Payment Batch]))VAR Condition2= CALCULATE(DISTINCTCOUNT(claim[Claim ID]),FILTER(claim, claim[Total Employee Payment Value])<100,FILTER(paymentbatchtable, paymentbatchtable[Payment File Cheque Generated]= "Yes" && paymentbatchtable[Payment Batch] = SELECTEDVALUE(paymentbatchtable[Payment Batch]))VAR Condition3 = FILTER(claim, claim[Total Employee Money Value(Base)])<100,
FILTER(chequerecord, CONTAINSSTRING(chequerecord[Payment Batch],"EFT")),FILTER(paymentbatchtable, paymentbatchtable[Payment File Cheque Generated]="Yes" && paymentbatchtable[Payment Batch] = SELECTEDVALUE(paymentbatchtable[Payment Batch]))VAR RESULT = Condition1 + Condition2 +Condition3RETURNRESULT- some_bih2 years ago
Community Champion
Hi kalkhudary you will need something "before" FILTER in VAR below
VAR Condition3 = FILTER(claim, claim[Total Employee Money Value(Base)])<100