Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
vardhancse
Specialist III
Specialist III

Straight Table Multiple number formats

Hi,

Have one requirement is that, one staright table dimension value should have multiple number formats.

For eg:

#,###.0
#0.00%

Can please do the needfull.

7 Replies
sasikanth
Master
Master

HI,

based on any conditions ? if so please specify

swuehl
MVP
MVP

You can check the dimension value and apply different formats using num() function in the expression, keep the number format on number tab to 'expression default':

=Num(

      Sum( Amount),

     Pick(Match( YourDimension, 'A', 'B'), '#,###.0','#0.00%')

      )

vardhancse
Specialist III
Specialist III
Author

Hi,

No conditions, some thing similar to below table:

DimActualPlan
Dim110.310.42
Dim220%30%

now for Dim1 the format is

#,###.0

and for dim2 the format is

#0.00%
sasikanth
Master
Master

HI,

Try like

If(Dim='Dim1',num(Sum(Actual),'#,##0.0'),num(Sum(Actual),'#,##0%'))

i dont think it will work if we have many values

Please share your  sample file

vardhancse
Specialist III
Specialist III
Author

Hi,

Thanks for your reply,

By using above condition only 1 dimension number format was changing not all.

can please let me know that I am doing right.?

swuehl
MVP
MVP

Could you upload a small sample QVW?

sunny_talwar

Using Stefan's technique:

Capture.PNG

Expression: =Num(Sum(Actual), Pick(Match(Dim, 'Dim1', 'Dim2'), '#,##0.0', '##%'))

=Num(Sum(Plan), Pick(Match(Dim, 'Dim1', 'Dim2'), '#,##0.0', '##%'))