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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

SET-analysis, help

Hi,

I have an app where a specific period is selected (lets say period 2).  But in one of all reports I would like to show period SALES for every periods (1,2,3,4,5,6,7,8,9,10,11,12). One measure/calculation per period. So I want to show period '1', period '2', period '3' and so on.

When I use " SUM ({$ <Period={'03'}>} SALES) " for period 3 it gives me 0. That is because I use $-sign.

But if I try to use " SUM ({1 <Period={'03'}>} SALES) " I get all Sales (disregarding all other selections) for all years for period 3, but I would only like to have sales for the Year selected.

Please help me with this SET-analysis.

7 Replies
Not applicable
Author

Hi Tobias,

              The equation will be something like this...

             

             SUM ({1 <Månad={'03'},Year={$(vYear)}>} SALES)

 

Set the variable to Year value i.e you have to put a trigger on Year 'select' where you have to set the variable 'vyear' .This equation is valid if you want a chart for a particular year selected and Period=3.

If you want it for year selected but for all the periods then:

              sum({1<Year='{$(vYear)}'>} sales)  

Let me know if  you need any further help.

Regards

Navin.G

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try this expression

=SUM ({ <YearFieldName={$(=Max(YearFieldName)},Period={'03'}>} SALES)

Hope this helps you.

Regards,

Jagan.

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Try with this expression

    

SUM ({<Period={'03'}>} SALES)

Celambarasan

Not applicable
Author

Jagan Mohan, your formula - =SUM ({ <YearFieldName={$(=Max(YearFieldName)},Period={'03'}>} SALES) - does not help, because Period 2, is choosen/selected in the application. How to get around that?

Not applicable
Author

Would be great if you provide a sample application which can be worked around

jagan
Partner - Champion III
Partner - Champion III

Hi,

Check for the selected year there are any values for Period 03.  The expression

=SUM ({ <YearFieldName={$(=Max(YearFieldName)},Period={'03'}>} SALES)

ignores the current selection of Period, because we are explicitly setting Period={'03'},

check whether your period has 03 or 3, if it is 3 then use

=SUM ({ <YearFieldName={$(=Max(YearFieldName)},Period={'3'}>} SALES)

Hope this helps you.


Regards,

Jagan.

suhasarchak
Partner - Contributor III
Partner - Contributor III

Hi Tobias,

Try this expression:

SUM ({<Period=}>} SALES)

Regards,

Suhas Archak