Forum Discussion
Khushboo9966
Helper II
2 years agoDAX Calculated measure verification
The following is the Calculated column DAX I am using. a) App Role is joined to App in a many-to-one relationship. Level 1 = IF( 'App'[TBUS] <= 24 && (TRUE) 'App'[NE] = "Existing", (TRUE)...
- 2 years ago
I cannot merge tables since this is direct query.
Level 1a = IF( ('App'[Total] <= 24) && ('App'[App Purpose] = "Purchase" || 'App'[App Purpose] ="Refinance"), IF(CALCULATE(COUNTROWS('App Role'), 'App Role'[Applicant Type]= "Individual" && 'App Role'[Role] = "PB") > 0 ,1,0),0)The below formula did the trick for me.
DallasBaba
Skilled Sharer
2 years agoKhushboo9966 I am looking looking at the pbix file and I would like to mention, changing the || pipe opratorator to && will make Level1 result return 0.
Level 1 =
IF(
('App'[Total] <= 24) && // <-- Is this value base on a dynamic selecting or Always be lessthan 24?
('App'[App Purpose] = "Purchase" ||
'App'[App Purpose] ="Refinance"), // Do you want result to return 0 when AppPurpose = Purchase or Refinance ?
IF(MAXX(FILTER('App Role','App Role'[Applicant Type]= "Individual" && 'App Role'[Role] = "PB"),1) >0 ,1,0),0)
Please read the comments in the code line.
I need a clear understanding of what you need in return.
- Khushboo99662 years ago
Helper II
I have update my pbix with table relationships.
SampleAnalysis/test.pbix at main · khushs9966/SampleAnalysis (github.com)
I want to return True(1) when all are True else False(0). If there is True and False it should False(0) but my code return True(1).
Level 1 = IF( ('App'[Total] <= 24) && // <-- Is this value base on a dynamic selecting or Always be lessthan 24? //(Yes, the formula will check each row ('App'[App Purpose] = "Purchase" || 'App'[App Purpose] ="Refinance"), // Do you want result to return 0 when AppPurpose = Purchase or Refinance ? (No, I want them to return 1 when App purpose matches the critiea) IF(MAXX(FILTER('App Role','App Role'[Applicant Type]= "Individual" && 'App Role'[Role] = "PB"),1) >0 ,1,0),0)