Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ZoeM
Specialist
Specialist

Dual Function in Pivot Table

Hi Qlik community.

I have scoured the forums looking for information on how you can use the Dual Function in a expression in a Pivot table and couldnt ifnd anything.

Can any of you great experts help me with this?

I want to show the Item and Order date in one cell within a pivot table, please see attached.

And is there any way I can hide the 'Month' label? And just have the months showing as is.

Thanks so much!

Zoe-

1 Solution

Accepted Solutions
sunny_talwar

You don't need dual function for this... you can try this

Item & '  ' & [Order Date]


Capture.PNG

View solution in original post

11 Replies
sunny_talwar

You don't need dual function for this... you can try this

Item & '  ' & [Order Date]


Capture.PNG

ZoeM
Specialist
Specialist
Author

Amazing!

That is exactly what I was hoping for.

As always, thanks Sunny!

ZoeM
Specialist
Specialist
Author

So Mexico and Uruguay bought multiple items on the same date. How can I show these items in the same cell and just one date?

sunny_talwar

You can use Concat

Concat(DISTINCT Item & '  ' & [Order Date])

ZoeM
Specialist
Specialist
Author

The date is duplicated for each Order Item. Is it possible to have only one date? Since they are the same...

sunny_talwar

Try this then


Concat(DISTINCT Item) & '  ' & [Order Date]

ZoeM
Specialist
Specialist
Author

For the data set I am working in, I am using Set Analysis where the date field is coming into the QVW via a Date Key. So I have to distinguish the date field as below:

Only({$<[Date Type]={'VPP Dates'}>}[Date])

When I write my expression to concatenate the order Item and Purchase date I am getting an error:

=Concat(DISTINCT 9Order Item]&CHR(10)&

Only({$<[Date Type]={'VPP Dates'}>}[Date]))

What could be the issue?

sunny_talwar

what is 9Order Item]? Typo? Also, a missing parenthesis... try this

=Concat(DISTINCT [Order Item])

&CHR(10)&

Only({$<[Date Type]={'VPP Dates'}>}[Date])

ZoeM
Specialist
Specialist
Author

I saw what it was...I forgot a parenthesis.

Your formula works, however there is no space between the Items:

ScrapersTrophies

Any way to separate?