Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 |
---|---|
77 | |
74 | |
42 | |
32 | |
28 |
User | Count |
---|---|
100 | |
93 | |
52 | |
50 | |
48 |