Forum Discussion
Conditional column: grouping data, is there an 'in between' option?
- Anonymous3 years ago
Hi DAXRichArd ,
Please try:
= Table.AddColumn( #"Removed Columns", "Aircraft Category", each if [weight] <= 12500 then "Small" else if [weight] > 12500 and [weight] <= 41000 then "Medium" else if [weight] > 41000 and [weight] <= 255000 then "Large" else if [weight] > 255000 then "Heavy" else "NO MATCH" )Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi DAXRichArd ,
Please try:
= Table.AddColumn(
#"Removed Columns",
"Aircraft Category",
each if [weight] <= 12500 then "Small"
else if [weight] > 12500 and [weight] <= 41000 then "Medium"
else if [weight] > 41000 and [weight] <= 255000 then "Large"
else if [weight] > 255000 then "Heavy"
else "NO MATCH"
)
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
- DAXRichArd3 years agoResolver I
Hi v-cgao-msft,
IT WORKED!
- In the screenshot below, from left to right, Aircraft Category is my original solution using CONDITIONAL COLUMN.
- The next column 'v-cgao-msft' is a column created using CUSTOM COLUMN. I copied and pasted your solution above into custom column. That returned 'Table.'
- The last column 'v-cgao-msft2' is what worked. I right clicked my mouse over the APPLIED STEPS and selected INSERT STEP AFTER, then pasted you solution in the formula bar and hit enter.
- That worked!
Big thx for all the help.
I'm a novice at MQuery, however I can find solutions just hacking away. Hope to be a Master at it like you one day.
Merry Christmas and have a wonderful New Year.