Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have the following calculated column, and it works fine(ish):
Column =
IF (
'citizen'[Source] = "1.1",
LOOKUPVALUE ( 'citizen2'[Other Source], 'citizen2'[id], 'citizen'[id] ),
"no"
)But now I've run into the situation where 'citizen2'[id] doesn't exist, so I get "" as a result. How can I insert another IF statement that will output "1.1.1" if Source = "1.1" and the LOOKUPVALUE is ""?
Solved! Go to Solution.
@grggmrtn , not very clear, try with switch-like
Column =
Switch (true() ,
LOOKUPVALUE ( 'citizen2'[Other Source], 'citizen2'[id], 'citizen'[id] ) = "1.1.1", "<>" ,
'citizen'[Source] = "1.1", LOOKUPVALUE ( 'citizen2'[Other Source], 'citizen2'[id], 'citizen'[id] ),
"no"
)
@grggmrtn , not very clear, try with switch-like
Column =
Switch (true() ,
LOOKUPVALUE ( 'citizen2'[Other Source], 'citizen2'[id], 'citizen'[id] ) = "1.1.1", "<>" ,
'citizen'[Source] = "1.1", LOOKUPVALUE ( 'citizen2'[Other Source], 'citizen2'[id], 'citizen'[id] ),
"no"
)
Thanks @amitchandak that worked great - I just had to switch your code up a bit:
Column =
Switch (true() ,
LOOKUPVALUE ( 'citizen2'[Other Source], 'citizen2'[id], 'citizen'[id] ) = "", "1.1.1" ,
'citizen'[Source] = "1.1", LOOKUPVALUE ( 'citizen2'[Other Source], 'citizen2'[id], 'citizen'[id] ),
"no"
)It does just what I need 🙂
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 97 | |
| 74 | |
| 50 | |
| 47 | |
| 44 |