Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Text values in a Pivot Table

Hi,

I'm struggling with the expressions on a pivot table,

My data is like this:

Product Price Date

    A      26      5/5/15

    A      27     23/7/15

    B      32      23/7/15

And I want a pivot table that shows me the prices according to the date like this:

        5/5/15      23/7/15

A        26            27

B         -              32

Can anybody help me to figure out how the expression should be.. Does it have to be with the Aggr() function?

Thank youu

1 Solution

Accepted Solutions
Colin-Albert

You can use multiple expressions.

e.g.  if(max(Price)>'', max(Price), maxstring(Price) )

If your price data is correctly formatted, I would not expect text values only numeric values

View solution in original post

7 Replies
settu_periasamy
Master III
Master III

Hi,

do you want like the below ?

QV_Comm_168256.JPG

find the attachment..

Not applicable
Author

Hi,

Please have a look at the attached file, hope it helps!

Kiru

Not applicable
Author

use 1st dimension as product

2nd as date.

expression as price.

you can even use only(price) as expression.

Not applicable
Author

Thank youuu !!! The Only function was what I was looking for

Colin-Albert

It would be better to use avg(), min() or max() as the expression rather than only, as only() will return null if your product has different price values on the same date.

Not applicable
Author

Yeah, that's what I noticed I wrote a numerical example in the question I asked, but in my actual app I have text values, so as you say, I have null values. Do you know any kind of solution for this situation?

Colin-Albert

You can use multiple expressions.

e.g.  if(max(Price)>'', max(Price), maxstring(Price) )

If your price data is correctly formatted, I would not expect text values only numeric values