Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
sks2701
Helper III
Helper III

token then expected

Hi- Can someone please help me what wrong I'm doing with the formula to get the error?

 

=if [Net sales growth] < 1% then "0% or below" else if [Net sales growth] >= 1% then "1% - 25%" else if [Net sales growth] >= 26% then "26% - 50%" else if [Net sales growth] >= 51% then "51% - 100%" else if [Net sales growth] >= 101% then "101% - 200%" else if [Net sales growth] >= 201% then "201% - 300%" else if [Net sales growth] >= 301% then "301% - 500%" else if [Net sales growth] >= 501% then "501% - 700%" else if [Net sales growth] >= 701% then "701% - 1000%" else if [Net sales growth] > 1000% then "Over 1000%" else "N/A"

 

sks2701_0-1603832063079.png

 

2 ACCEPTED SOLUTIONS
AlB
Community Champion
Community Champion

Hi @sks2701 

It must be the % character. You can't use it like that. Instead of 1% use the number: 1/100 or  0.01. Same for all other % instances in the code

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

View solution in original post

PhilipTreacy
Super User
Super User

Hi @sks2701 

Make sure to replace all % values where you are representing a number e.g.

 

if [Net sales growth] < 0.01
else if [Net sales growth] >= 0.26

 

 etc.

Phil


If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

4 REPLIES 4
PhilipTreacy
Super User
Super User

Hi @sks2701 

Make sure to replace all % values where you are representing a number e.g.

 

if [Net sales growth] < 0.01
else if [Net sales growth] >= 0.26

 

 etc.

Phil


If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


THANK YOU! It helped 🙂

AlB
Community Champion
Community Champion

Hi @sks2701 

It must be the % character. You can't use it like that. Instead of 1% use the number: 1/100 or  0.01. Same for all other % instances in the code

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

thank you !

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.