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.
Hi Community,
I have the following Formula :
Solved! Go to Solution.
Hi @Anonymous ,
Approve with @AnthonyJoseph , based on your descrition, I have created a simple sample:
Here is my method, please try:
Marketable =
SWITCH(FORMAT([Marketableflag],"True/False"),
"True",1,
"False",0,
BLANK())
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or if you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.
Refer to:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Approve with @AnthonyJoseph , based on your descrition, I have created a simple sample:
Here is my method, please try:
Marketable =
SWITCH(FORMAT([Marketableflag],"True/False"),
"True",1,
"False",0,
BLANK())
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @amitchandak
Apologies for that. So basically I have a column from my original dataset called Marketable Flag,
It consists of TRUE and FALSE, then some values are BLANKS. I want to create a new column that converts the TRUE values to 1 & FALSE values to 0 and EXCLUDES the Blank values.
I hope this is clearer
Hi @Anonymous .... I'm not sure if I have understood your problem correctly but from what I understand-- you have a column ("Marketable Flag") that has 3 distinct value (True, False and Blank) and you need an expression to retain blank when the value is blank else it should return 1 or 0 if its true or false respectively.
If my understanding is correct, please can you try the below:
New Column =
If(
ISBLANK(Table[Marketable Flag]), BLANK(),
IF(Table[Marketable Flag] = TRUE(),1,0)
)
I'm not sure what does EXCLUDE Blank mean in the problem but just shared my 2 cents from what I understood...
Hope this helps!
Thanks,
AnthonyJoseph
@Anonymous The information you have provided is not making the problem clear to me. Can you please explain with an example.
Appreciate your Kudos.
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 |
---|---|
47 | |
24 | |
20 | |
15 | |
13 |
User | Count |
---|---|
51 | |
46 | |
39 | |
19 | |
19 |