Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Highlighted
paulyeo11
Valued Contributor II

Modify SET expression from YTD and Month Close.

Hi All

I have below expression , it will return YTD sales :-

Sum({$<year = {$(=Max(year)-1)}, month = {"<=$(=Max({<year={$(=Max(year))}, sales = {'*'}>} month))"}>}sales/$(Columndim89)/1000)

Now i need to modify the above expression to display month closed. Meaning only display Jan and Feb sales amount exclude march sales amount.

So the result should only shown 1461

Paul

1 Solution

Accepted Solutions

Re: Modify SET expression from YTD and Month Close.

I think this one got already resolved, isn't it Paul?

Sum({$<year = {$(=Max(year)-0)}, month = {"<$(=Max({<year={$(=Max(year))}, sales = {'*'}>} month))"}>}sales/$(Columndim89)/1000)

4 Replies
paulyeo11
Valued Contributor II

Re: Modify SET expression from YTD and Month Close.

My Qv Doc!

jonas_rezende
Valued Contributor

Re: Modify SET expression from YTD and Month Close.

Hi, paul yeo.

Excluding the march month, not would be 2461? Please, confirm.

Regards,

Jonas Melo.

Re: Modify SET expression from YTD and Month Close.

I think this one got already resolved, isn't it Paul?

Sum({$<year = {$(=Max(year)-0)}, month = {"<$(=Max({<year={$(=Max(year))}, sales = {'*'}>} month))"}>}sales/$(Columndim89)/1000)

paulyeo11
Valued Contributor II

Re: Modify SET expression from YTD and Month Close.

Hi Jonas

Many SET expert here already give me the correct solution , as for the amount is not important , as my QV sampledata file keep changing. most impt is the right expression which already confirm by the expert here. Now i aware that the = sign is to handle month closed. and '*' is to handle don't select any date.... very interesting discovery.

Paul

Community Browser