Did you know..? Cyclic Group

    download.jpg

    Working with Qlikview or QlikSense is like playing a good RPG or FPP game - you are working hard looking for  a solution and then you

    picking a "Magic Weapon" and you are on next level.

     

    "Did you know...?" is all about quick tips and tricks

     

    So let me start.

     

    Did you know that...

     

    Can the cyclic group be used in an expression?

     

    Did you?

     

    That's good but if you did not - you may be surprised.

    Recently I had to find a way to pick up values from Cyclic Group only to discover that after

    if(GerCurrentField(...

    Capture.PNG

    Qlikview throws beautiful Red Lines.

     

    Head down...fists tight. but wait.

    What is the Community for?

     

    My quest leads me to this topic

    The specified item was not found.

     

    where our Superhero John Witherspoon posted the solution to my problem.

     

    Because QV does not recognize its own syntax you are left out without IntelliSense.

    Try to enter long expression - and you will be sweating and swearing...

    The good point is - Its Work.

     

    For those who are using personal edition:(with all credits to John) - please try yourself

     

    Script:

     

    dimension:

    LOAD * INLINE [

        CategoryID, CategoryName

        1, Car

        2, CD

        3, DVD

        4, Laptop

        5, Software

        6, Sunglass

    ];

     

     

    fact_sales:

    LOAD * INLINE [

        CategoryID, SaleValue

        1, 1000

        2, 40

        3, 50

        4, 200

        5, 25

        6, 15

    ];

     

     

    fact_cost:

    LOAD * INLINE [

        CategoryID, CostValue

        1, 700

        2, 30

        3, 25

        4, 120

        5, 5

        6, 8

    ];

     

     

    [Expression Group]:

    LOAD * INLINE [

    Sales, Cost

    Sales, Cost

    ];

     

    GUI:


    1)

              Create new bar chart

     

    2)

        Add dimensions:

      a) CategoryName

     

    and

            b)Create new Cyclic dimension SalesCost with Cost and Sales as Dimensions.

    Capture.PNG

     

    3) Add Expression:

    =if(getcurrentfield(SalesCost)='Sales',sum(SaleValue),sum(CostValue))

    Capture.PNG

     

    And Voila! you got your Magic Sword.

     

    Good luck in your quests.

     

     

    Feeling Qlikngry?

    How To /Missing Manual(25 articles)