Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hi!
I am trying to create wordcount bands in Power Query editor but I am doing something wrong as I get only <500 or 500 to 2000, i get why but I have not been able to create the different band properly
= Table.AddColumn(#"Changed Type", "Wordcount bands3", each if [#"Project size#(lf)(total)"] < 500 then "< 500" else if [#"Project size#(lf)(total)"] > 500 then "500 to 2000" else if [#"Project size#(lf)(total)"] > 2000 then "2000 to 5000" else if [#"Project size#(lf)(total)"] > 5000 then "5000 to 10000" else if [#"Project size#(lf)(total)"] > 10000 then ">10000" else null)
Can someone help me please?
TGhanks
Solved! Go to Solution.
Hi @margheritamart ,
Please modify the formula to:
= Table.AddColumn(#"Changed Type", "Wordcount bands3", each if [#"Project size#(lf)(total)"] < 500 then "< 500" else if [#"Project size#(lf)(total)"] > 500 and [#"Project size#(lf)(total)"]<=2000 then "500 to 2000" else if [#"Project size#(lf)(total)"] > 2000 and [#"Project size#(lf)(total)"]<=5000 then "2000 to 5000" else if [#"Project size#(lf)(total)"] > 5000 and [#"Project size#(lf)(total)"]<=10000 then "5000 to 10000" else if [#"Project size#(lf)(total)"] > 10000 then ">10000" else null)
By my test it works fine:
I attach my sample below for your reference.
Best regards,
Community Support Team_yanjiang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @margheritamart ,
Please modify the formula to:
= Table.AddColumn(#"Changed Type", "Wordcount bands3", each if [#"Project size#(lf)(total)"] < 500 then "< 500" else if [#"Project size#(lf)(total)"] > 500 and [#"Project size#(lf)(total)"]<=2000 then "500 to 2000" else if [#"Project size#(lf)(total)"] > 2000 and [#"Project size#(lf)(total)"]<=5000 then "2000 to 5000" else if [#"Project size#(lf)(total)"] > 5000 and [#"Project size#(lf)(total)"]<=10000 then "5000 to 10000" else if [#"Project size#(lf)(total)"] > 10000 then ">10000" else null)
By my test it works fine:
I attach my sample below for your reference.
Best regards,
Community Support Team_yanjiang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you! It works perfectly!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 75 | |
| 36 | |
| 31 | |
| 29 | |
| 26 |