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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

merging 3 expression into one expression

Hello all,

I am three expression say:

RollingMonth as a dimension

PreviousMonth_CurrentYear =sum({<RollingMonth={'$(=VPM)'}>} SalesAmount)

CurrentMonth_CurrentYear =sum({<RollingMonth={'$(=VCM)'}>} SalesAmount)

CurrentMonth_PreviousYear =sum({<RollingMonth={'$(=VCM)'}>} SalesAmount)


where as variable are


VPM= =MonthName(AddMonths(max(SalesDate),-1))


VCM= =MonthName(max(SalesDate))


VCMLY= MonthName(AddMonths(max(SalesDate),-12))


Can I merge these 3 expression into 1 expression by using Pick,Match,WildMatch function etc.


Regards,

Balraj


27 Replies
Anonymous
Not applicable
Author

Why its not working on Year or month???

sunny_talwar

You mean why it is not working on a selection in Year or Month Fields? What would you want to see when you make a selection there? We might have to play around with the variables to make it work with selection in those fields.

Anonymous
Not applicable
Author

hi

try:

=sum({<RollingMonth={'>=$(=VCMLY)'}>} SalesAmount)


if not please can you elaborate on what you want to achieve.

Regards

Neetha

sasiparupudi1
Master III
Master III

Sunny,

What if the dimension is made as a calculated dimension

only({<RollingMonth={'$(=VPM)', '$(=VCM)', '$(=VCMLY)'}>} RollingMonth)


and expression as

=Sum(SalesAmount)


Sasi

kavita25
Partner - Specialist
Partner - Specialist

What is your format of Rolling Month field??

sunny_talwar

Not sure how it would work, but definitely worth giving a short.

Anonymous
Not applicable
Author

This would not work as it would be giving you all the values of which is greater then my VCMLY..

Anonymous
Not applicable
Author

I have simply used monthname(date) as rollingmonth

Anonymous
Not applicable
Author

Not working..

sunny_talwar

You did not respond to my question here:

You mean why it is not working on a selection in Year or Month Fields? What would you want to see when you make a selection there? We might have to play around with the variables to make it work with selection in those fields.