Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
benjamin_naujoks
New Contributor II

Ignore all selections except one

Hej Community,

 

I have a question about ignoring everything except one selection.

In QlikView there was the possibility in Set Analysis to do this.  The function was something like this:

sum({1<date= $:: date>} Sales)

So every Sales would be summed up which has been in the days.

I know there is also a function like ' date =p(date)' but this isn't working for me, because I have some data which should divided up even if they are not in this days.

 

Hope you know something similar to '=$::'   or you can help me.

 

Best regards,

Benjamin

 

8 Replies
pradosh_thakur
Honored Contributor II

Re: Ignore all selections except one


 

sum({1<date= $:: date>} Sales)

So every Sales would be summed up which has been in the days.

I know there is also a function like ' date =p(date)' but this isn't working for me, because I have some data which should divided up even if they are not in this days.

 


what do you mean by which has been in the days? 

Learning never stops.

Re: Ignore all selections except one

Would you be able to elaborate with an example?

benjamin_naujoks
New Contributor II

Re: Ignore all selections except one

for example....I have cost within a duration of 6 month....then I want to figure out all the cost when every selection is disabled except the date. take all the cost for this duration, make a variables out of this and divided it by all the products...something like this. 

 

And good example is what is written here:

https://qliktech.hosted.jivesoftware.com/docs/DOC-12724 

 

benjamin_naujoks
New Contributor II

Re: Ignore all selections except one

It's something like this here:

https://qliktech.hosted.jivesoftware.com/docs/DOC-12724

 

If this isn't concrete enough, I try to make it something easier with pictures:

Here are some screenshots:

I have a formular which is:

=(sum({1<[%Eindeutiger_Monat] = p([%Eindeutiger_Monat]), [Mite_Daten.billable] = {'true'}>} Mite_Daten.minutes)/60)

in QlikView I could do it with  [%Eindeutiger_Monat] =$:: ([%Eindeutiger_Monat] instead of

[%Eindeutiger_Monat] = p([%Eindeutiger_Monat], but this doesn't work for sense.

When I just look at all the customers(in my case) I see the value 80561,3, which is correct but when I filter at some customers, the value is different because then qlik takes only the (possible) sum of the months, where the company was "active". 

 

Best regards

Benjamin

Re: Ignore all selections except one

This should work in Sense and View the same way... have you tried this?

=(Sum({1<[%Eindeutiger_Monat] = $::[%Eindeutiger_Monat], [Mite_Daten.billable] = {'true'}>} Mite_Daten.minutes)/60)

Make sure to not have a ( between $:: and your field name

image.png

benjamin_naujoks
New Contributor II

Re: Ignore all selections except one

Sorry, this was only a copy paste mistake:

My function is without the (

(sum({1<[%Eindeutiger_Monat] =$:: [%Eindeutiger_Monat], [Mite_Daten.billable] = {'true'}>} Mite_Daten.minutes)/60)

Re: Ignore all selections except one

Would you be able to share a sample where we can see that this isn't working?

benjamin_naujoks
New Contributor II

Re: Ignore all selections except one

Hej Sunny_talwar,

 

I build an easy app to share it with you and figured out, that it is possible in Qlik Sense, but also different.

The code is the same than in QlikView, I only need to take another filter.

 

QlikView:

In my case it was clear month (e.g. 02-2018....05-2018) and this was connected to a calender. I could choose months and years and the formular worked.

(sum({1<%Eindeutiger_Monat =$::%Eindeutiger_Monat,Mite_Daten.billable = {'true'} >} Mite_Daten.minutes)/60)

QlikSense:

I tried the same in Qlik Sense

Somehow it doen't work when I choose a month or a year as a selection, but if I choose directly "%Eindeutiger_Monat" it worked.

So now I changed the formular to this:

(sum({1<[Kalender.Jahr] =$::[Kalender.Jahr],[Kalender.Monat] =$::[Kalender.Monat],Mite_Daten.billable = {'true'} >} Mite_Daten.minutes)/60)  and it works now with my selections.