Forum Discussion

Pbiuserr's avatar
Pbiuserr
Icon for Post Prodigy rankPost Prodigy
4 years ago

What-if parameter values as category on chart

Hello

I have one advanced, complex query (as for me). 

Lets assume I calculate some measure and its monthly change. I have a threshold, lets say 30% (on monthly change) and I would like to  build a chart based on that, so basically the category (thus axis) would consist of countries/locations/places/you name it, which passed the threshold in given period. I guess I'd need to use what-if parameter? 

 

Any idea how to build that or other way to visualise these values along with some measure calculated for them?

 

6 Replies

  • VijayP's avatar
    VijayP
    Icon for Community Champion rankCommunity Champion

    Pbiuserr 

    How you want the threshold appear in chart , some data point gives more clarity

    • Pbiuserr's avatar
      Pbiuserr
      Icon for Post Prodigy rankPost Prodigy

      VijayP 
      It doesn't need to be visible in chart or just in tooltip so user can see this >=30%

      for example the chart would be like:

       

      headcount (value) of countries (x-axis) which got >=30% threshold in given period (calendar[year-month]) so for example in feb 2022 Austria na UK will be visible on chart, in October 2011 Netherlands, UK, France etc 

      in Qlik its referred as "calculated dimension"


  • VijayP's avatar
    VijayP
    Icon for Community Champion rankCommunity Champion

    Pbiuserr 

    You can create what if parameter and there you need to select the data type decimal

    in min 0 and in max 1 and increment will be 0.1

    This will create a table containing one Column and a measure 

    that measure you need to apply in your measure with switch or if function

    if(the slicer value >0.3%,measure, blank()) ! let me know if any challenges

    • Pbiuserr's avatar
      Pbiuserr
      Icon for Post Prodigy rankPost Prodigy

      VijayP 
      It doesn't really filter as I wanted, however you gave me an idea


      filter country =

      filterVar = [Percentage change]
      RETURN
      IF ( filterVar < 0.05, BLANK(), [Headcount])

      works good. are there any drawbacks of that?

      • VijayP's avatar
        VijayP
        Icon for Community Champion rankCommunity Champion

        Pbiuserr 

        in your DAX you need to replace 0.05 with What if parameter! then it would be dynamic

    • Pbiuserr's avatar
      Pbiuserr
      Icon for Post Prodigy rankPost Prodigy

      Hello,

      Nope, I've abandoned this idea, however the answers weren't quite what I wanted to achieve. Thank you