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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
qwertzuiop
Advocate III
Advocate III

Check if number is between statement

Dear PowerBI Community

 

First of all: Good luck for 2020!

 

I have the following question:

I want to create a calculated column that returns me a specific string.

 
IF
0Break
1Break
2Break
3Break
4NoBreak
5NoBreak
6NoBreak
7NoBreak
8NoBreak
9NoBreak
10NoBreak
11NoBreak
12NoBreak
13NoBreak
14NoBreak
15NoBreak
16NoBreak
17NoBreak
18NoBreak
19NoBreak
20NoBreak
21NoBreak
22Break
23Break

 

Anyone can help me?

Thank you so much for your help.

 

Cheres!

qwertzuiop

1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

Hi @qwertzuiop 

is it ok?

Column = IF(
[Column] > 3 && [Column] < 22,
"NoBreak",
"Break"
)

 

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

4 REPLIES 4
az38
Community Champion
Community Champion

Hi @qwertzuiop 

is it ok?

Column = IF(
[Column] > 3 && [Column] < 22,
"NoBreak",
"Break"
)

 

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

a.PNG

 

I'm sure you're right, but unfortunately the formula isn't working as it should.

Do I have a syntax error?

Hi,

 

2 things ..

1st : the "=" sign is written twice at the beginning of the colomun expression

2nd : make sure that [timeOfCreationInNumber] has a number format otherwise because PBI is not able to compare numbers with strings. check in Power query if change is possible or in PBI, use VALUE([timeOfCreationInNumber])

 

Hope it helps 😉

Thank you very much.

It works now.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.