Forum Discussion
AsmaAlNashash
3 years agoFrequent Visitor
Switch Case based on NULL values
Hi, I am currently trying to do something very simple. I want to create a new column in which if only the first column is Not Null, the value will be 1. If the First and Second columns are not Null t...
- Anonymous3 years ago
Hi Asma,
I have created dummy data for your reference, hopefully your requirement is fulfilled.
Note: You can use LOOKUPVALUE Dax in order to get columns from different tables.
Dax -Column =Var a= if(ISBLANK('Table (2)'[Column1]),0,1)var b = if(ISBLANK('Table (2)'[Column2]),0,1)var c = if(ISBLANK('Table (2)'[Column3]),0,1)var d = if(ISBLANK('Table (2)'[Column4]),0,1)Var e = a+b+c+dreturn e
Please refer to the below image.
Samarth_18
3 years agoCommunity Champion
Hi AsmaAlNashash ,
You could try like this:-
StageID =
IF ( ISBLANK ( MAX ( 'Table (1)'[Column1] ) ), 0, 1 )
+ IF ( ISBLANK ( MAX ( 'Table (2)'[Column2] ) ), 0, 1 )
+ IF ( ISBLANK ( MAX ( 'Table (3)'[Column3] ) ), 0, 1 )
+ IF ( ISBLANK ( MAX ( 'Table (4)'[Column4] ) ), 0, 1 )
Thanks,
Samarth