Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

adambrian
New 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

Re: Minus One Day

Try these expressions

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

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

7 Replies

Re: Minus One Day

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
New Contributor III

Re: Minus One Day

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

Re: Minus One Day

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
New Contributor III

Re: Minus One Day

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

Re: Minus One Day

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
New Contributor III

Re: Minus One Day

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
New Contributor III

Re: Minus One Day

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