Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
When i enter as TRUE/FALSE or True/False in Text data type column it is considered as String which is leading to incorrect output. Is it possible to enter Boolean values in Text data type column? If yes, How?
Solved! Go to Solution.
@RamaKrishna8989 This is merely showing you what the results are for each individual event if it were its own column. It's not saying that the outcome of mixed formatted records in a column would automatically calculate the specific output as it is listed in that table. Below is an example of what I mean:
1. The column True/False is boolean structured. Therefore TRUE = 1 and FALSE = 0.
2. The column 1/0 has a blank, a zero and ones. The output is the Measure 1/0s which aligns to the AVERAGEA output.
Hope this makes sense.
Theo 🙂
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
Hi @RamaKrishna8989 yes, this can certainly be done. Just add " " at the start and end of the condition to determine whether the condition you're putting forward is TRUE/FALSE.
If I've misunderstood your question, please feel free to add an example of what you're referring to.
Thanks,
Theo
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
Here, TRUE and FALSE are considered as Text, i want them to be considered as Boolean so my calculation happens correctly.
@TheoC, If i am modifying values if working as expected. However, i am trying to replicate something like the below example.
Here, the Amount column has "TRUE" boolean value for Transaction id = 0000126. How is this considered as a boolean value to result in the value as "1"
@RamaKrishna8989 with the example you've provided, you can use conditional statements such as IF or SWITCH TRUE to achieve what you are after. For example, you can create a Calculated Column and use the below:
Calculated Column =
SWITCH (
TRUE()
'Table'[Amount] = "1" , 1 ,
'Table'[Amount] = "20" , 20 ,
'Table'[Amount] = "n/a" , 0 ,
'Table'[Amount] = "" , 0 ,
'Table'[Amount] = "TRUE" , 1 )
The above is aligned to the example image you provided and you can switch the "Amount" column to "Col1" to meet your version from the original post.
Let me know if that makes sense?
Theo 🙂
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
@TheoC, but the above calculated column is all done with just averagea function as shown in the screenshot. Wondering how was that possible.
@RamaKrishna8989 This is merely showing you what the results are for each individual event if it were its own column. It's not saying that the outcome of mixed formatted records in a column would automatically calculate the specific output as it is listed in that table. Below is an example of what I mean:
1. The column True/False is boolean structured. Therefore TRUE = 1 and FALSE = 0.
2. The column 1/0 has a blank, a zero and ones. The output is the Measure 1/0s which aligns to the AVERAGEA output.
Hope this makes sense.
Theo 🙂
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
@RamaKrishna8989 please send link.
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
@RamaKrishna8989 If your source data contains Col 1 and the source data has 1, FALSE, One, TRUE, then you will need to modify the data in Col 1 in the raw source file.
The boolean output should be based on a condition being met or not being met. For example:
I hope this makes sense?
Thanks heaps
Theo
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
@RamaKrishna8989 In addition to the above, your entire Col1 should be TRUE or FALSE if you are wanting it to be treated as such. Once you do that, you can go into Power Query by pressing "Transform Data" and then simply click the "abc" on the column like below:
Once you've done that you can click on "TRUE/FALSE"
This will convert the column to a boolean like below:
Hope this is what you're wanting.
Theo 🙂
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
119 | |
78 | |
58 | |
52 | |
48 |
User | Count |
---|---|
171 | |
117 | |
61 | |
59 | |
53 |