Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

Pivot Expression

In my pivot Table the following expression is working fine

=SUM({<I_MONTH = {"$(=Only(I_MONTH))"},I_DAY = {">25"}>} [PREMIUM])

But the expression given below returns 0 value

=SUM({<I_MONTH ={"$(=Only([1_MONTH])-1)"},I_DAY = {">25"}>} [PREMIUM])

Can some pls tell me what is wrong with 2nd expression

5 Replies
Not applicable

maybe this difference is a problem:

Only(I_MONTH

Only([1_MONTH])-

Not applicable

Use the below expression as 2nd expression and see if this works, I have added () to Only(1_MONTH)

=SUM({<I_MONTH ={"$(=(Only([1_MONTH]))-1)"},I_DAY = {">25"}>} [PREMIUM])

Not applicable

Can you try below:

=SUM({<I_MONTH ={"$(=$(=Only([1_MONTH]))-1)"},I_DAY = {">25"}>} [PREMIUM])

Thanks,

Angad

tresesco
MVP
MVP

Two possibilities:

  • typo - [1_MONTH] or [I_Month]
  • If your [1_Month] field is not numeric 'only([I_MONTH])-1' would not work for obvious reason.
jagan
Partner - Champion III
Partner - Champion III

Hi,

What is your I_MONTH values format? Is it 1,2,3,4,etc.  If it is numeric then try below expression



=SUM({<I_MONTH ={"$(=Only([I_MONTH])-1)"},I_DAY = {">25"}>} [PREMIUM])

Also you are using 1_MONTH (numeric month) please check.

Regards,

Jagan.