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 agoAnonymous
Khushboo9966you can merge both tables as a flat table to create a measure to return 1 when conditions are met; else, 0? Get solution .pbix file on GitHub
https://github.com/DallasBaba/DaxSolutions/blob/main/Khushboo9966%20Solution.pbix
Solution =
VAR Case1 = IF(OR('OneTable'[App Purpose] = "Purchase", 'OneTable'[App Purpose] = "Refinance"), 1, 0)
VAR Case2 = IF(AND('OneTable'[Applicant Type] = "Individual",'OneTable'[Role] = "PB"), 1, 0)
RETURN
IF(
'OneTable'[Total] <= 24 &&
Case1 = 1 &&
Case2 = 1,
1,
0
)
I tried using the same measure to the values you wanted when the table was separated with a one-many relationship, but I had no luck until after merging the tables.
Kindly let me know if this meet you needs.
Thanks
Dallas
Khushboo9966
Helper II
2 years agoI 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.