Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Set Analysis with field equal to formula of that field

I've got a data set that has two date dimensions, one is a month end date (called PED), the other is the month I saved the data (called Monthly_DataDate).

I have a List Box setup for Monthly_DataDate so the user can select the data pull they are interested in. I want to have a table that compares the selected month, and the prior month's data set for say sum(Budget) IE:

PED8/1/16 Budget7/1/16 Budget
20161,5001,000
2017500200

I've tried to do something like this:

Sum({$<Monthly_DataDate={'$(=AddMonth(Monthly_DataDate,-1)'}>} Budget)

But I don't get anything back.

I've also tried using a variable:

v_Monthly_DataDate =GetFieldSelections( Monthly_DataDate,';', 1,'Other Reports' )

V_Monthly_DataDate gives me the data I expect, but when I use it in a set analysis, it appears to be ignoring my other filters:

Sum({$<Monthly_DataDate={'$(vMonthly_DataDate)'}>} Budget)

What am I doing wrong?

3 Replies
galax_allu
Valued Contributor

Re: Set Analysis with field equal to formula of that field

Hi

try  like this !

For Previous Month:

Sum({$<Monthly_DataDate={"$(=Date(AddMonths(Monthly_DataDate,-1),'MM/DD/YYYY')"}>} Budget)



For Current Month:



Sum({$<Monthly_DataDate={"$(=Date(Max(Monthly_DataDate),'MM/DD/YYYY')"}>} Budget)



//Edited:






Not applicable

Re: Set Analysis with field equal to formula of that field

That gave me all nulls back. If I change my Monthly_DataDate list box to last month, I get data in the period column, but no mater what date I select it's always null in the last month column.

Re: Set Analysis with field equal to formula of that field

You field showing Date Budget. But, while calculating you attempt only Budget. Can you please post sample application and Data which demonstrates the O/P

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)