Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Data format in single cell

Hi there,

I have another question.

It it possible to change the data format of a single cell? I know that you can change the colour and borders via Design Grid but can I also change the number format for one cell?

E.g. I have a table where there are numbers in ###,#% and in #.### format but right now I can only choose #.### OR ###,#% but I would like to have both.

Hope you got what I'm looking for.

Thanks a lot!

1 Solution

Accepted Solutions
Not applicable
Author

Ok I figured it out, that is the formula i'm using

=IF("expression">1,Num("expression",'#.###,#'),

("expression"<1,Num("expression",'###,#%'))

View solution in original post

4 Replies
oxtontom
Contributor III
Contributor III

Hi cdettmer,

I am fairly sure you can write the formatting in the expression / definition and then use an IF statement to toggle between the formatting. Though I am fairly new myself and not exactly sure of the code! my gues would be something like this

=If( Number() - Number1 < Number3

  , format ####

  , If( Today() - number 3 < number 2

      , format ######%

      , format ######,#

      )

  )

Hope this helps!

Tom

Not applicable
Author

Hi oxtontom,

with the expression "number" are you adressing a specific cell or do you want me to enter the number?

Thanks!!

Not applicable
Author

Well that is settled but QV doen't accept the term format. Does anyone knows the syntax?

Thanks!

Not applicable
Author

Ok I figured it out, that is the formula i'm using

=IF("expression">1,Num("expression",'#.###,#'),

("expression"<1,Num("expression",'###,#%'))