Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Blackadder2000
Contributor II
Contributor II

Keep trailing zeroes in pivot table

Hi,

I have a pivot table with text (varchar in SQL) measures which are displayed with Only(Measure). For numbers all trailing zeroes in the decimals are removed. Any idea how I can keep all trailing zeroes and keep the source formatting?  

Labels (2)
3 Replies
Anil_Babu_Samineni

Try these

Only(Num(Measure, '#,##,#0'))

Or

Only(Text(Measure))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Blackadder2000
Contributor II
Contributor II
Author

None of the examples worked out. The first just results in 2 decimals regardless if the original data contains any decimals or not. The other also removes the trailing zeroes.

The original data in the SQL Varchar column looks like this:

7,35

7,40

7,50

7,51

The data shown in the excel pivot with Only(Measure) is shown as:

7,35

7,4

7,5

7,51

The result will not always contain 2 decimals so I need a general function that can keep the source formatting including the trailing zeroes for text (varchar) results.

Blackadder2000
Contributor II
Contributor II
Author

Any other idéas?