Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
joeychua
Contributor
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
miskinmaz
Creator III
Creator III

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

Lisa_P
Employee
Employee

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
miskinmaz
Creator III
Creator III

Instead of 

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

you can use

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

Lisa_P
Employee
Employee

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

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