Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
adambrian
Contributor III
Contributor III

Minus One Day

Hi All,

I want create two pie chart where first pie chart show today(date where i click) and second pie chart (one day before date where i click). Can you help me to create pie chart.

For example :

1. If i click ActivityDate=13/09/2016, first pie chart will show all activity where date= 13/09/2016 and second  pie chart will show all activity where date=12/09/2016.

2. If i click ActivityDate=12/09/2016, first pie chart will show all activity where date= 12/09/2016 and second  pie chart will show all activity where date=11/09/2016.

Adam

1 Solution

Accepted Solutions
sunny_talwar

Try these expressions

1) Count({<ActivityDate = {"$(=Date(Max(ActivityDate), 'YYYY-M-DD'))"}>}ID)

2) Count({<ActivityDate = {"$(=Date(Max(ActivityDate) - 1, 'YYYY-M-DD'))"}>}ID)

View solution in original post

7 Replies
sunny_talwar

Try these expressions

1) Count({<ActivityDate = {"$(=Date(Max(ActivityDate), 'YYYY-M-DD'))"}>}ID)

2) Count({<ActivityDate = {"$(=Date(Max(ActivityDate) - 1, 'YYYY-M-DD'))"}>}ID)

adambrian
Contributor III
Contributor III
Author

Hi Sunny,

Thank for your quick answer. I have another 2 questions.

1) If I want to highlight background color which one old and new activity on table chart. For example :

  - Old activity where today don't have yesterday activity as red color.

  - New activity where yesterday dont have today activity as green color.

2) On table chart, Show only where Activity='Study','Sport','Game'.

Thank,

Adam

sunny_talwar

Hi Adam -

I am not sure if this is needed in one of the table that you have in your application or is this is a new chart? Also can you provide the expected output based on the data you have within the application today?

Best,

Sunny

adambrian
Contributor III
Contributor III
Author

Hi Sunny,

Can you help me to do expression for that question. I am not familiar with qlik sense.. Where can I learn create expression in qlik sense?

Thanks,

Adam

sunny_talwar

I am willing to help, but you need to provide me more details as to where you are trying to do this and what is the expected output? Without knowing these details I might not be able to offer much help

adambrian
Contributor III
Contributor III
Author

Hi Sunny,

What I mean is in table, can we set ActivityDate background color.

For example,

If i click today date (20/09/16), i want to see background change to red color for activity which only happen today(20/09/16) (yesterday this activity not happen), and also view where yesterday(19/09/16) activity with yellow background (today this activity not happen).

Can we set table like this? i attached picture below. Sorry for late to inform to you.

normal table.png

after i select 20/09/2016, table will be like this..

after.png

adambrian
Contributor III
Contributor III
Author

Hi Sunny,

i tried and get error.. can you help me this one?

Count({<ActivityDate = {"$(=Date(Max(ActivityDate ), 'YYYY-M-DD'))"},ActivityDate ={'>=09:00:00<=22:29:59'}>}ID)


Count({<ActivityDate = {"$(=Date(Max(ActivityDate ) - 1, 'YYYY-M-DD'))"},ActivityDate ={'>=09:00:00<=22:29:59'}>}ID)



thanks,

adam