Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I tried to create a new column based on a if > and < then.
I am trying to create a new Custom column.
I don't understand why this does not work. It is asking for a token on the second Answer Numeric Value statement.
what is missing?
Bucket S=
[Answer Numeric Value] >= 0 && [Answer Numeric Value] <= 4999 , "$1 - $4,999",
[Answer Numeric Value] >= 5000 && [Answer Numeric Value] <= 9999 , "$5,000 - $9,999",
[Answer Numeric Value] >= 10000 && [Answer Numeric Value] <= 24999,"$10,000 - $24,999",
[Answer Numeric Value] >= 25000 && [Answer Numeric Value] <= 49999,'$25,000 - $49,999',
[Answer Numeric Value] >= 50000 && [Answer Numeric Value] <= 99999, "$50,000 - $99,999",
[Answer Numeric Value] >= 100000 && [Answer Numeric Value] <= 499999, "$100,000 - $499,999",
[Answer Numeric Value] >= 500000, "$500,000 +"
Solved! Go to Solution.
@acg , Try like
Bucket S=Switch(True(),
[Answer Numeric Value] <= 4999 , "$1 - $4,999",
[Answer Numeric Value] <= 9999 , "$5,000 - $9,999",
[Answer Numeric Value] <= 24999,"$10,000 - $24,999",
[Answer Numeric Value] <= 49999,'$25,000 - $49,999',
[Answer Numeric Value] <= 99999, "$50,000 - $99,999",
[Answer Numeric Value] <= 499999, "$100,000 - $499,999",
[Answer Numeric Value] >= 500000, "$500,000 +"
)
It works, as long as it is used uner Fields, and a new column is created in Fields. Thank you! Fantastic
hmm, does not work as Switch(True(), seems to want a calculated field and Answer Numeric Value is a column. Also, how can the calculation be true as half of the conditins were left out? I mean this [Answer Numeric Value] <= 9999 , "$5,000 - $9,999" would make [this Answer Numeric Value] <= 4999 , "$1 - $4,999" irrelevant? right?
@acg , Try like
Bucket S=Switch(True(),
[Answer Numeric Value] <= 4999 , "$1 - $4,999",
[Answer Numeric Value] <= 9999 , "$5,000 - $9,999",
[Answer Numeric Value] <= 24999,"$10,000 - $24,999",
[Answer Numeric Value] <= 49999,'$25,000 - $49,999',
[Answer Numeric Value] <= 99999, "$50,000 - $99,999",
[Answer Numeric Value] <= 499999, "$100,000 - $499,999",
[Answer Numeric Value] >= 500000, "$500,000 +"
)
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
135 | |
118 | |
101 | |
71 | |
61 |