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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
IAMDV
Master II
Master II

*** Filter data based on selected fields in Set Analysis / Using Indirect Analysis ***

Dear All,

I am working on a survey project. I had data for different activities like...

  • Travel
  • Away from Home - Shopping
  • Away from Home - Entertainment
  • Away from Home - Eating

I have this data for each hour of the day and each day of the week. Now I wanted to look the behaviour of my audience. I mean I am using a simple set analysis expression to display a bar chart...

COUNT({$<TimeStampValue = {$(=($(vMaxCurrentTime)))} , Q_No ={'Q1'} >} Resp_ID)

Now I wanted to look at the behaviour of the same audience for next & previous hour. So I had created a variable which calculates the previous & next hour based on the time selected by the user. And if the user selects a specific time, day & activity.

For example : Selecting the audience who travel at 7AM on Sunday. And if there are 1000 responses for the same.

*** Now I wanted to see the behaviour of these 1000 respondents in previous hour & next hour? ***

I hope it all makes sense. Your help/suggestions are much appreciated

Many thanks in advance.

Cheers - DV


1 Solution

Accepted Solutions
IAMDV
Master II
Master II
Author

Finally, I got it working with trail & error method.... My logic was right but my syntax was incorrect.

Here is what I need

COUNT

    ({$<TimeStampValue={$(=($(vPreviousHour)))},

    Q_No = {'Q1'},

    Label_Text = {1} Label_Text,

    Resp_ID = p({$<TimeStampValue={$(=($(vMaxCurrentTime)))}>} Resp_ID)>}

Resp_ID)

Many thanks to those who read this post!

Cheers - DV

View solution in original post

4 Replies
IAMDV
Master II
Master II
Author

Also, I had tried to use indirect analysis. But I can't get it working

I can explain more if you need to know more details...

Cheers - DV

IAMDV
Master II
Master II
Author

Adding to my previous post :

I had tried using the Indirect Analysis and can't seem to get the syntax right. Please can someone look into this one...

COUNT(({<TimeStampValue={$(=($(vPreviousHour)))},

     Resp_ID = p({<TimeStampValue={$(=($(vCurrentTime)))} Resp_ID>})

Resp_ID)

Thanks - DV

IAMDV
Master II
Master II
Author

I had got the syntax right, however it does not filter the data based on current selection. Please can someone look this for me...

COUNT({$<TimeStampValue={$(=($(vNextHour)))},

     Q_No = {'Q1'},

     Resp_ID = p({$<TimeStampValue={$(=($(vCurrentTime)))}>} Resp_ID)>}

Resp_ID)

This expression with Indirect Set Analysis returns zero . Which is incorrect...

Thanks - DV

IAMDV
Master II
Master II
Author

Finally, I got it working with trail & error method.... My logic was right but my syntax was incorrect.

Here is what I need

COUNT

    ({$<TimeStampValue={$(=($(vPreviousHour)))},

    Q_No = {'Q1'},

    Label_Text = {1} Label_Text,

    Resp_ID = p({$<TimeStampValue={$(=($(vMaxCurrentTime)))}>} Resp_ID)>}

Resp_ID)

Many thanks to those who read this post!

Cheers - DV