Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
joeychua
New Contributor

Set Analysis for Data Month

Hi All,

I am having trouble creating a set analysis to call out data from LasRefresh to 3 months back. There is no syntax error in the below expression but there is a Error in Calculation message shown. Please advise, thanks.

 

=MaxString(
{$<
[Date]= {">=$(=Date(addmonths(LasRefresh),'DD/MM/YY'),-12))"}
>}
[ID])

Labels (4)
2 Solutions

Accepted Solutions
Highlighted
miskinmaz
Contributor III

Re: Set Analysis for Data Month

Instead of 

[Date]= {">=$(=Date(addmonths(LasRefresh),'DD/MM/YY'),-12))"} with misplaced brackets

you can use

[Date]= {">=$(=Date(addmonths(LasRefresh,-3),'DD/MM/YY'))"}

View solution in original post

Highlighted
Employee
Employee

Re: Set Analysis for Data Month

Hi Joey,
Not sure about your LasRefresh, but you could try the ReloadTime() function like this:
=MaxString(
{$<
[Date]= {">=$(=addmonths(ReloadTime(), -12))"}
>}
[ID])

View solution in original post

3 Replies
Highlighted
miskinmaz
Contributor III

Re: Set Analysis for Data Month

Instead of 

[Date]= {">=$(=Date(addmonths(LasRefresh),'DD/MM/YY'),-12))"} with misplaced brackets

you can use

[Date]= {">=$(=Date(addmonths(LasRefresh,-3),'DD/MM/YY'))"}

View solution in original post

Highlighted
Employee
Employee

Re: Set Analysis for Data Month

Hi Joey,
Not sure about your LasRefresh, but you could try the ReloadTime() function like this:
=MaxString(
{$<
[Date]= {">=$(=addmonths(ReloadTime(), -12))"}
>}
[ID])

View solution in original post

Highlighted
MVP
MVP

Re: Set Analysis for Data Month

If LasRefresh is a field and has more than one possible value*, then the expression will not work. This called a 'naked field' as it is not enclosed in an aggregation (like Sum(), Avg(), Max(), ...) and QV cannot determine which value to use, so it returns null.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein