Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
bruno_m_santos
Partner - Creator
Partner - Creator

Set Analysis Doubt

Hi,

I'm trying to make a Setanalysis expression but until now without success.

I want exclude Brands where (365-Max( $(vSetRolling12) Date) + Min( $(vSetRolling12) Date)) <$(vL4LNrDays)

Could you give me an hand

Thanks

Bruno

=

Sum({$<MonthID = {">=$(=Max(MonthID) - 11)<=$(=Max(MonthID))"},
CalendarType = {$(=vCalendarType)},
MonthOrder = ,
Date = {"<=$(=Max(Date))"},
Year = ,
FiscalYear = ,
Quarter = ,
Period = ,
Week = ,
[Period (#)] = ,
[Brand Code]= E({$<_Inactive_Brand={'1'},
                    
Date = {">=$(=min( $(=$(vSetRolling12)) Date))  <=$(=max( $(=$(vSetRolling12)) Date)))"}> }

>}),
Month = >} [#Sales EUR])



//(365-Max( $(vSetRolling12) Date) + Min( $(vSetRolling12) Date)) <$(vL4LNrDays)

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Maybe this:

sum({<

MonthID = {">=$(=Max(MonthID) - 11)<=$(=Max(MonthID))"},

CalendarType = {$(=vCalendarType)},

MonthOrder = ,

Date = {"<=$(=Max(Date))"},

Year = ,

FiscalYear = ,

Quarter = ,

Week = ,

[Period (#)] = ,

Month = ,

[Brand Code]={'=(365-Max( $(vSetRolling12) Date) + Min( $(vSetRolling12) Date)) <$(vL4LNrDays) and Sum({$(vRolling12)} _Inactive_Brand)<1'}

>}

[#Turnover EUR])


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Not applicable

I don't know exactly what you're looking for... Date function needs parenthesis.

However, start by combining (365-Max( $(vSetRolling12) Date) + Min( $(vSetRolling12) Date)) in 1 variable so in your set analysis it'll be easier to evaluate.

Gysbert_Wassenaar

See here


talk is cheap, supply exceeds demand
bruno_m_santos
Partner - Creator
Partner - Creator
Author

Hi Gysbert

I’m uploading my app to demonstrate my issue.

You ‘ll find a last column “Like For Like”. In this column I´m filtering the inactive Brands, but I need filter Brands that in the last Rolling12 have  365-Max( $(vSetRolling12) Date) + Min( $(vSetRolling12) Date)) <5

Thanks in Advance

Bruno

Gysbert_Wassenaar

Maybe this:

sum({<

MonthID = {">=$(=Max(MonthID) - 11)<=$(=Max(MonthID))"},

CalendarType = {$(=vCalendarType)},

MonthOrder = ,

Date = {"<=$(=Max(Date))"},

Year = ,

FiscalYear = ,

Quarter = ,

Week = ,

[Period (#)] = ,

Month = ,

[Brand Code]={'=(365-Max( $(vSetRolling12) Date) + Min( $(vSetRolling12) Date)) <$(vL4LNrDays) and Sum({$(vRolling12)} _Inactive_Brand)<1'}

>}

[#Turnover EUR])


talk is cheap, supply exceeds demand
bruno_m_santos
Partner - Creator
Partner - Creator
Author

FANTASTIC.

Many Thanks Gysbert.

I was completely in the wrong direction. I thought this was only possible with P () and E (). I have a question. Why use single quote instead of double Quotes.

Thnks

Bruno