Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis Issue

Hi All,

I am currently using SET Analysis on my dashboard and the outcome is really weird.

I have used the following code to set the year and month for revenue :

=sum( {< DocumentDateYear= {$(vCurrentYear)}, Month= {$(vCurrentMonth)} >} GrossBillAmt)

vCurrentYear = Year(Reloadtime())

vCurrentMonth = Month(Reloadtime())

The answer is coming wrong as 0.00

When I tried the same code using dummy data on other machine it worked correctly. I am not sure what is the error in my code. I did check the machines date and time setting as well, it is correct

Thanks in advance.

4 Replies
Not applicable
Author

Hi,

Please check, you have the data for the Year=2014 and month =November.

if you do, then please check that you had that data for the respected dimension, for which you want to create expression.

With Regards

Harshita Gaur

its_anandrjs

Hi,

1. How you create your variables if it is Ctrl + Alt + V then check weather you put the equal sign in front of the expression or not like for below variables.

vCurrentYear =Year(Reloadtime())

vCurrentMonth =Month(Reloadtime())

2. Also check the values of the variables in the text object ex:-  =vCurrentYear &' - '&vCurrentMonth

And your expression is correct

=sum( {< DocumentDateYear= {$(vCurrentYear)}, Month= {$(vCurrentMonth)} >} GrossBillAmt)

Regards

Anand

maxgro
MVP
MVP

sum({<DocumentDateYear={$(=year(reloadtime()))}, Month={$(=Month(reloadtime()))}> }  GrossBillAmt)

if doesn't wotk, check Month values and Month(reloadtime()) value

SunilChauhan
Champion II
Champion II

I am not sure weither  DocumentDateYear=current is available or not

DocumentDateYear


you could try this


=sum( {< DocumentDateYear= {"$(vCurrentYear)"}, Month= {"$(vCurrentMonth)"} >} GrossBillAmt)


or you could use below


=sum( {< DocumentDateYear= {"$(=Year(Reloadtime()))"}, Month= {"$=(Month(Reloadtime()))"} >} GrossBillAmt)



or you could attched sample file .

Sunil Chauhan