Forum Discussion
DAX Calculated measure verification
- 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.
Khushboo9966 your can modify the DAX formula
Level 1 =
IF(
'App'[TBUS] <= 24 &&
'App'[NE] = "Existing",
IF(
COUNTROWS(
FILTER(
'Application Role',
'App Role'[Role] = "PB" &&
'App Role'[App Type] = "Individual"
)
) > 0,
1,
0
),
0
)
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!
DallasBaba : No it doesn't work. I get the below error:
"This expression refers to a Column object named 'Application[Test]', which has an error."
- DallasBaba2 years ago
Skilled Sharer
Khushboo9966 Do you have a table name 'Application'
Or are you trying to refere to 'Application Role' [Test]' before getting the error message ?
More also, can you share a pbix file of your work sample- Khushboo99662 years ago
Helper II
Hi, I have attached a sample PBIX file, Refer to App ID 914, The result of Level 1 should be 0 but I get 1.
https://github.com/khushs9966/SampleAnalysis/blob/main/test.pbix
- Anonymous2 years agoNot applicable
Hi Khushboo9966 ,
According to your statement, I think you can try code as below to update [Level1] calculated column.
Level 1 NEW = VAR _PBLIST = CALCULATETABLE ( VALUES ( 'App Role'[Role] ), FILTER ( 'App Role', 'App Role'[App ID] = EARLIER ( App[App ID] ) && 'App Role'[Applicant Type] = "Individual" ) ) RETURN IF ( ( 'App'[Total] <= 24 ) && ( 'App'[App Purpose] = "Purchase" || 'App'[App Purpose] = "Refinance" ), IF ( MAXX ( FILTER ( 'App Role', "PB" IN _PBLIST ), 1 ) > 0, 1, 0 ), 0 )Result for you sample is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.