Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

set analysis inside an aggregated dimension

Hi everyone,

I have the following aggregation as one of my dimensions:

=aggr(sum([Total OUL]),[Voucher Product Code])

What I would like to do is to put set analysis inside of this expression.

I have the following I would like to add as set analysis:

day = $(vmaxday), where vmaxday is a variable I declared which states max(day)

How would the final output look like?

Any help will be much appreciated.

Thanks,

Stefan

4 Replies
settu_periasamy
Master III
Master III

May be this

=aggr(sum({<day ={'$(=vmaxday)'}>}[Total OUL]),[Voucher Product Code])

Anonymous
Not applicable
Author

What I have at the moment is:

=aggr(sum({<[Day Date]= {'$(vMaxDayDate)'}>} [Total OUL]),[Voucher Product Code])

but it brings nothing back.

I also tried

=num(aggr(sum({<[Day Date]= {'$(=vMaxDayDate)'}>} [Total OUL]),[Voucher Product Code]),'##,##0')

but with no luck

settu_periasamy
Master III
Master III

check the variable =vMaxDayDate giving the correct value or not in the text box.

can you post the sample?

Anonymous
Not applicable
Author

Hi,

I found that my date column wasnt seen as a date but instead as a string. when displaying vmaxdaydate in a textbox it came back as a blank. because the variable was declared as max(day).


I changed it around a bit and it works perfectly now. thank you so much for the feedback