Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
benjamin_naujoks
Partner - Contributor II
Partner - 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

 

Labels (3)
8 Replies
pradosh_thakur
Master II
Master II


 

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.
sunny_talwar

Would you be able to elaborate with an example?

benjamin_naujoks
Partner - Contributor II
Partner - Contributor II
Author

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
Partner - Contributor II
Partner - Contributor II
Author

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

sunny_talwar

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
Partner - Contributor II
Partner - Contributor II
Author

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)

sunny_talwar

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

benjamin_naujoks
Partner - Contributor II
Partner - Contributor II
Author

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.