Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hey there. Newbie here. I have a column named Stock that contains a variety of values. I've created a new column that I would like to return a No or Yes value based on the below.
What am I doing wrong? 🙂
Solved! Go to Solution.
Hi @Anonymous ,
Try creating calculated columns like this:
Stock Y/N = IF('Table (2)'[Stock]<>"No"&&NOT(ISBLANK('Table (2)'[Stock])),"Yes","No")
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Is this problem sloved?
If not, please let me know.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
check this out.
https://docs.microsoft.com/en-us/dax/switch-function-dax
Stock Y/N =
SWITCH(
'Table'[Stock],
BLANK(), BLANK(),
"No" , "No" ,
"Yes"
)
Hi @Anonymous ,
Try creating calculated columns like this:
Stock Y/N = IF('Table (2)'[Stock]<>"No"&&NOT(ISBLANK('Table (2)'[Stock])),"Yes","No")
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , In a new column this should have worked
Stock Y/N = IF('Table'[Stock] = "No", "No", "Yes")
Means when value is no then return No else return yes
Or
Stock Y/N = IF('Table'[Stock] in{ "Yes" , "Some" , "Not Many"} , "Yes","NO")
Or
Stock Y/N = IF('Table'[Stock] = "Yes" || 'Table'[Stock] = "Some" || 'Table'[Stock] = "Not Many"} , "Yes","NO")
For And you can use &&
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |