How Can We Pad 0 To Integer Values In Power BI

Overview

Sometimes we have a requirement, where we need to Pad “0” to our numeric value. There are multiple ways to implement this. But we will go with the simplest and easiest one!

So, let’s get started!

Step 1

This is our Sample data source, where we have Project ID, Project Name, and Hours column.

Now, we want to pad “0” before our Project ID column and need the end outcome like the following. So, how can we achieve this?

Step 2

Open Model View of Power BI Desktop and select a column “Project ID”.

From Format, select “Custom”.

Under Custom Format provide, format as “00#” – This will suggest, from a 3-digit number, it will pad leading digits with “0”.

Example: If the number is 9, then it will show as “009”. If the number is 19 then it will show as “019”.

This will show us the end outcome as below screen!

Conclusion

This is how we can simply pad leading “0” before the number in Power BI. Isn’t that cool?

Happy Reporting!!