2 Replies Latest reply: Dec 3, 2017 8:12 AM by Ali Ahmad RSS

    If logic is not working in Qliksense

    Manoj Kumar

      Hi folks,

      I am using two  Data sources in my Dashboard. SQL and Oracle.

      I have taken Month and Year & day filed based on CreatedDate in script. Front end I made a table with 10 columns ,7 were coming exact result but  I have one more  column called it as Total Cancellation. To get that column result I need to use two  logic's, that is:

      1.Membership_cancellation_Date minus Membership_Since < 360, its cancel or else it is renewal.

      2.Cancellation_date-330 days result value should be inside Boarding Time then it is cancel or else it is renewal.

      Any one I can use.

       

      IN Script I  used:-

      If(IsNull(MEM_CANC_DATE),'N/A', IF((MEM_CANC_DATE-MEM_SINCE)<360,'Cancelled','Renewal')) as Count_Cancel

      IN Front End I used:

      Count({<Count_Cancel={'Cancelled'}>}MEM_CANC_DATE)

       

      But I am not receiving result. Please Help me..

       

      Here Membership_cancellation_Date and Membership_Since both fields are coming from one table and it is belongs to Oracle DB. And CreatedDate is coming from MySQL. CreatedDate field table is fact table in my dashboard.


      Note: If I change my calendar with Mem_Cancellation_Date, I am getting total cancellation value but remaining fields are mismatching.


      Please Help me Friends... It's very urgent i was fighting with this issue from last 3 days.

        • Re: If logic is not working in Qliksense
          Andy Weir

          Ok there is alot going on here.   let's start by looking at your data model.

           

          The fact your data is coming from 2 seperate data sources in itself isn't a issue.   what's of interest is how you are associating the two data sets.   you don't describe how they are linked.

           

          The next thing is check if your formula is working.   best way to check is load your data and display the columns in a table to see if your formula is resolving correctly.   only when you know this do you go onto the final step of using it in your count measure.  I'm not sure what counting the number of cancelled things by cancelled date gives you insight wise but it's your requirement as I read it.

           

          I would have thought number of cancelled memberships would be more interesting in which case count of the membership ID would be more suitable but you don't mention this field in your data set I'm just assuming.

           

          Hope this helps more you on.

           

          Regards

           

           

          Andy

          • Re: If logic is not working in Qliksense
            Ali Ahmad

            Any way you can share some data? Might be easier then...