Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
Highlighted
sangeeth8787
New Contributor III

Set Analysis and Concatenation

Hi,

 

I have a field Year-MonNu, when ever the user selects any particular date Eg: 06 June 2019, The year-Month Number field shows as 2019-06.

In a Pivot Chart, I have 5 expressions, 4 out 5 based on Date Selection, the 5th Expression need to retrieve the Year-MonthNu value based on Users Date Selection.

 

Date : 06 June 2019

Ideally I need to write set expression as  sum({<Year_MonthNo = '2019-06'}>}SalesAmount)

Eg: =  Sum({<Year-MonthNo = {"=$(Year(Date))" & "-" & =$(=Num(Month(Date))}}>}SalesAmount)

Could any help me how to retrieve the year and Month Number with concatenating '-' in set expression.

Many Thanks

Sangeeth

1 Solution

Accepted Solutions

Re: Set Analysis and Concatenation

May be this

=Sum({<[Year-MonthNo] = {"$(=Date(MonthStart(Max(Date)), 'YYYY-MM'))"}>} SalesAmount)

View solution in original post

2 Replies

Re: Set Analysis and Concatenation

May be this

=Sum({<[Year-MonthNo] = {"$(=Date(MonthStart(Max(Date)), 'YYYY-MM'))"}>} SalesAmount)

View solution in original post

sangeeth8787
New Contributor III

Re: Set Analysis and Concatenation

Hi Sunny,

 

I am glad for your answer, It worked very well for me with small change in the expression you provided.

 

=Sum(Date = , {<[Year-MonthNo] = {"$(=Date(MonthStart(Max(Date)), 'YYYY-MM'))"}>} SalesAmount)

 

 

Thanks

Sangeeth