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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
WhaleWatcher222
Helper II
Helper II

Show score to one dp in M Script

Hi Experts

 

See if formula as a custome column in Power Query -Where the Helper column is Apples i want the end result to be displayed in the new column to 1dp esle just score to 0 dp. How can i amend the following to accommendate

 

= if[Helper] = "Apples" then [Score] * 100 else [Score]

1 ACCEPTED SOLUTION
hnguy71
Super User
Super User

Hi @WhaleWatcher222 ,

If I understood you only want to see 1 decimal points if apples else all rest is 0 decimals as the output? If that's the case the following should work:

 

= if [Helper] = "Apples" then Number.Round([Score] * 100, 1) else Number.Round([Score], 0)

 

 



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

View solution in original post

1 REPLY 1
hnguy71
Super User
Super User

Hi @WhaleWatcher222 ,

If I understood you only want to see 1 decimal points if apples else all rest is 0 decimals as the output? If that's the case the following should work:

 

= if [Helper] = "Apples" then Number.Round([Score] * 100, 1) else Number.Round([Score], 0)

 

 



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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