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 you can rewrite your calculated column DAX as:
Level 1 =
IF(
'App'[TBUS] <= 24 &&
'App'[NE] = "Existing",
IF(
MAXX(
FILTER(
'Application Role',
'App Role'[Role] = "PB" &&
'App Role'[App Type] = "Individual"
),
1
) > 0,
1,
0
),
0
)
This way, the MAXX function will return the maximum value of 1 in the filtered table for each ‘Application ID’, and if there is no row that meets the condition, it will return BLANK. This will ensure that your calculated column DAX returns 0 or 1 for each ‘Application ID’, as expected.
Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!
Let me know if this work
@ me in replies or I'll lose your thread!!!
Thanks