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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
acarlos
Regular Visitor

zero left

I need to create a filter between two records in a register that starts with 0000001, 0000002, ..... 0000100 and power bi does not allow numeric formatting with leading zeros and if field is text type the filter only works as list

1 ACCEPTED SOLUTION

Hi @acarlos

 

You can use my blog post, which will add the required amount of zero's to your data.

 

To complete it, you will need to make the changes in the Power Query Editor (Edit Queries) window

 

https://www.fourmoo.com/2015/03/25/power-query-adding-leading-zero-to-number-eg-month-number/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

View solution in original post

5 REPLIES 5
v-chuncz-msft
Community Support
Community Support

@acarlos,

 

As mentioned above, you may add a slicer based on a calculated column.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I need a numerical field with leading zeros to use a filter between two values:

000001,00002,00003,....,000099,000100

select 000040 between 000050 for example

so the field has to be numerical with leading zeros but power bi does not allow this formatting

if field is text only allows filter in list without intervals

Hi @acarlos

 

You can use my blog post, which will add the required amount of zero's to your data.

 

To complete it, you will need to make the changes in the Power Query Editor (Edit Queries) window

 

https://www.fourmoo.com/2015/03/25/power-query-adding-leading-zero-to-number-eg-month-number/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

I need a numerical field with leading zeros to use a filter between two values:

000001,00002,00003,....,000099,000100

select 000040 between 000050 for example

so the field has to be numerical with leading zeros but power bi does not allow this formatting

if field is text only allows filter in list without intervals

Floriankx
Solution Sage
Solution Sage

Hello I don't exactly get your aim. 

 

Maybe it works for you to have to columns, one as number formatting (VALUE([register]) to convert Text to number

and anohter one with text for displaying (FORMAT([register],"0000000") depending on wether you have text or number in register.

 

So you could calculate with your numeric column, but display the text column.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors