cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
saksham_kumar
Frequent Visitor

Display single row value in decimal

Hi,

 

I have a summed column as:

 

FieldValues
A2
B5
C4
D3
E9

 

The real value against Field C is 3.5 and against Field E is 8.9

Can I show the real values in Power BI against these 2 particular fields only? I do Not want remaining values to show up as 2.0, 5.0 and 3.0. Only 4 (Filed C) should show up as 3.5 and 9 (Field E) should show up as 8.9.

1 ACCEPTED SOLUTION
parry2k
Super User III
Super User III

@saksham_kumar you can put condition and change format based on field, just an idea, you can change as per your need.

 

 

 

My Field = IF( Table[Field] IN {"C","E"}, FORMAT( [MyValue], "#####0.0" ),
FORMAT([MyValue],"######"))





Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





View solution in original post

5 REPLIES 5
parry2k
Super User III
Super User III

@saksham_kumar you can put condition and change format based on field, just an idea, you can change as per your need.

 

 

 

My Field = IF( Table[Field] IN {"C","E"}, FORMAT( [MyValue], "#####0.0" ),
FORMAT([MyValue],"######"))





Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





View solution in original post

Hi @parry2k ,

 

I'm having trouble using your function to work for this exact problem I'm trying to solve. Wondering if you could help.

 

The name of the data table that I have is called "Region Sales"

 

toyoman62_0-1611770879863.png

 

I want only the "% of Sales" row to show up as a decimal and the other row to remain as a whole number. I can't seem to get your solution to work. Help!

 

My Field = IF( Table[Field] IN {"C","E"}, FORMAT( [MyValue], "#####0.0" ),
FORMAT([MyValue],"#####0"))

 

Thanks!

Hi, a follow up question.

 

I have a table with values to 1 decimal place. Can I have the total with Zero decimal places?

Please note, this is not a calculated column.

 

So an addition of

1.2

2.5

5.2

4.2

---

Total should be 13 and Not 13.1

@saksham_kumar you can check with hasonevalue and change the format of your total.






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Hi,

 

This worked. Thanks! Just a minor change - 

My Field = IF( Table[Field] IN {"C","E"}, FORMAT( [MyValue], "#####0.0" ),
FORMAT([MyValue],"#####0"))

 

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors