6 Replies Latest reply: Sep 20, 2016 7:37 AM by Adam Brian RSS

    Minus One Day

    Adam Brian

      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

        • Re: Minus One Day
          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)

            • Re: Minus One Day
              Adam Brian

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

                    • Re: Minus One Day
                      Adam Brian

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

                            • Re: Minus One Day
                              Adam Brian

                              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