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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
JohnGray
Helper I
Helper I

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

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

@JohnGray 

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

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 @JohnGray ,

 

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.

 

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.