Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
varunreddy
Creator III
Creator III

Can we use this in set analysis

Hi,

I am trying to convert this into set expression. Is there a way to do it?

 

if([Pull Type]='M' or [As of Date] = '$(vmaxDate)', [As of Date])

Cheers!

20 Replies
varunreddy
Creator III
Creator III
Author

I am using a bar chart, where dimension is if([Pull Type]='M' or [As of Date] = '$(vmaxDate)', [As of Date])

and expression is count(ID)

I want Date where [Pull type] = 'M' or [As of Date] = max([As of Date])

sunny_talwar

May be this:

=Concat(DISTINCT {<[Pull Type] = {'M'}> + <[As of Date] = {"$(=Date(Max([As of Date]), 'YourDateFieldFormat'))"}>} [As of Date])

varunreddy
Creator III
Creator III
Author

Not working

Qrishna
Master
Master

Dimension :

Aggr(Only({$<[Pull Type] = {'M'} + [As of Date] = {"$(vmaxDate)"}>} [As of Date]),[As of Date] )


Expression : count(ID)

sunny_talwar

If its your dimension, try this:

=Aggr(Only({<[Pull Type] = {'M'}> + <[As of Date] = {"$(=Date(Max([As of Date]), 'YourDateFieldFormat'))"}>} [As of Date]), [As of Date])

varunreddy
Creator III
Creator III
Author

What is + sign doing there?

sunny_talwar

+ gives the union of the sets

Checkout page number 4 of the attached PDF.

varunreddy
Creator III
Creator III
Author

Chaitanya,

This expression is working with minor changes.

Aggr(Only({$<[Pull Type] = {'M'}> + <[As of Date] = {"$(vmaxDate)"}>} [As of Date]),[As of Date] )

varunreddy
Creator III
Creator III
Author

Thank You Sunny and Chaitanya

Cheers!

sunny_talwar

We are glad to help Varun