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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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