2 Replies Latest reply: Jan 9, 2017 6:52 PM by Lokesh Patel RSS

    Dynamic expression based on filter - Qlik Sense

    Lokesh Patel

      Hi Guys,

       

      I have two dimensions

       

      1. Product Category

      2. Product Name

       

      So the purpose is.. if user has only made selection on Product Category level instead of Product Names then the table should show count of total categories and as soon as user filters any product Name then that expression should change to count product names.

       

      Something like this:

      If Product Name Selection is > 0 then count(Distinct([Product Name])) else  Count(Distinct([Product Category]))

       

      What is the best way to write that expression?

       

      Thank you.