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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

FORMAT function not working for decimal to percentage conversion

Hi All,

 

I have a measure called #DaysElapsed, with following formula

1.png

 I am displaying this measure in a table visual. It is working as expected and giving me a decimal which I am displaying as percentage using the formstting options and then publishing the report in PowerBI Service.

The value is displayed as a percent. 

But when downloading (exporting data from table visual), this value is shown as decimals in exported excel.

 

When I am trying to use FORMAT function as 

1.png

 the data is getting duplicated and the value is coming blank in the entire table visual.

 

Please suggest how to resolve this

1 ACCEPTED SOLUTION
PC2790
Community Champion
Community Champion

Hello ,

 

Can you try the below once:

#DaysElapsedPcnt = FORMAT(DATEDIFF(SELECTEDVALUE('B2R Active Offers'[Offer Start Date]),TODAY(),DAY)/90,"0.0%")

View solution in original post

5 REPLIES 5
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please try what @PC2790  said, it works well for me.

Use the date format instead of the date hierarchy. The value will not be empty.

V-lianl-msft_0-1618208141994.pngV-lianl-msft_1-1618208152339.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.

PC2790
Community Champion
Community Champion

Hello ,

 

Can you try the below once:

#DaysElapsedPcnt = FORMAT(DATEDIFF(SELECTEDVALUE('B2R Active Offers'[Offer Start Date]),TODAY(),DAY)/90,"0.0%")

Anonymous
Not applicable

Hello,

 

Thanks for the support !!!!
I have tried this as well, but this is also not working.

 

Regards

amitchandak
Super User
Super User

@Anonymous , Check the format here

https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-custom-format-strings

 

Also in measure tools, you have the option to mark it as %

https://stackoverflow.com/questions/38353064/how-to-format-new-measure-not-column-in-power-bi-as-percentage

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hello,

 

Thansk for the support!!!

I have tried formatting it using the modelling tab. That way, display in table visual is workinf fine. However, when exporting data from table visual on PowerBI service, the formatting seems to be dropping, as it is then showing decimals (and not percentage) in downloaded data.

 

Regards

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors