Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
s33pie007
Contributor

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

Re: set analysis inside an aggregated dimension

May be this

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

s33pie007
Contributor

Re: set analysis inside an aggregated dimension

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

Re: set analysis inside an aggregated dimension

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

can you post the sample?

s33pie007
Contributor

Re: set analysis inside an aggregated dimension

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