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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

How to get 0's to pull in PowerBI

Hello,

 

I have a dataset that supplies information to multiple reports. Some of the reports require phone numbers in one format, some require phone numbers in another. The SQL data has phone numbers stored in the format of 5555555555 to allow for easier formatting going forward. However, if a number hasn't been given, the default number it should display is 0000000000. This is the case when certain reports allow for the number to pull in the default format, but in other reports where the phone format has to be something like 000-000-0000 the phone numbers will just read as -- because PowerBI is storing the number as an integer (i.e., as just 0). Is there a way to get 0's to pull as  astring rather than an integer? 

Thanks in advance!

 

(Please note: I do not have access to Power Query with this dataset. The organization does not grant me access to this feature, everything I do has to be through DAX). 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hello Liang,

 

Unfortunately this data is formatted into text, so I was unable to use the "Custom Format" option. I did end up figuring out how to get it to work though, I just had to add in a formatting specification in DAX for 000-000-0000. Thank you for your help though!

View solution in original post

4 REPLIES 4
Fowmy
Super User
Super User

@Anonymous 

Can you provide some sample data and show the expected results?

 

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

Hello,

I hope this screenshot is clear, the "Stored" column is how the phone number is being stored on the SQL server, the "Pulling As" is how it is appearing in PowerBI, and the "Desired Result" is what I want the number to read as after formatting the column to pull with dashes in it. Phone Numbers.png

Hi @Anonymous ,

 

You can try to customize the formatting of this column in the model view:

V-lianl-msft_0-1619490130445.png

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

Hello Liang,

 

Unfortunately this data is formatted into text, so I was unable to use the "Custom Format" option. I did end up figuring out how to get it to work though, I just had to add in a formatting specification in DAX for 000-000-0000. Thank you for your help though!

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

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