Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

Buttons

Hi Everyone , 

 

 

so basically (as shown in the picture below)  I want to have the shown buttons to switch between two values (GP= Gross profit) and (OP= Operating profit) 

 

so the axis will contain the four divisions (food&Refreshment,beauty personal care,home care and refreshment) and the constant value would be the turnover . and the buttons would just allow the viewr of the report to switch between GP & OP instead of having to make 2 visuals. 

 

hope there is an answer to that 

 

thank you in advance :) buttons

 

5 Replies

  • Ani1991's avatar
    Ani1991
    Resolver III

    Hi Anonymous,

     

    Instead of buttons you could go for Chiclet slicer that is available in marketplace.
    After importing the custom visual Chiclet Slicer, you need to create a table using the Enter Data option like below,

    Drag the VS column to the Category Field of Chiclet Slicer. You will see something like the below image. Go to the visualisation Format option and under General Select Multiple select as OFF and Force Selection as ON.

    Now you need to create 3 measures as below: (replace your column names accordingly)

    SUMGP = SUM(Products[GP])
    SUMOP = SUM(Products[OP])
    VS_GP_OP = SWITCH(SELECTEDVALUE(VS[VS]),"vs GP",[SUMGP],"vs OP",[SUMOP])

    Then modify your chart by replacing the GP and OP fields with the measure VS_GP_OP. 

    Now on clicking "vs GP" you will see only two bars one for Turnover and other for GP and similary for "vs OP".

     

    Hope this helps!!

     

    Thanks,

    Ani

    • Anonymous's avatar
      Anonymous
      Not applicable

      thanks for your answer, the thing is i do not have a column under the name (VS)  

       

      So, I did not quite get the syntax of the measure below 

       

      VS_GP_OP = SWITCH(SELECTEDVALUE(VS[VS]),"vs GP",[SUMGP],"vs OP",[SUMOP]

       

      please clarify more would be great :)  

      • Ani1991's avatar
        Ani1991
        Resolver III

        Hi Anonymous 

        You need to create a connectionless table using the Enter Data option like below. It is a seperate new table.

        image.pngAnd then you would create a measure like below in your main dataset

        VS_GP_OP = SWITCH(SELECTEDVALUE(VS[VS]),"vs GP",[SUMGP],"vs OP",[SUMOP]

        which says, if the user has selected vs GP under the Chiclet slicer then display the measure [SUMGP] and if the selectedvalue is vs OP then show the measure [SUMOP].

         

        Let me know for any further concerns.

         

        Thanks,

        Ani

  • v-piga-msft's avatar
    v-piga-msft
    Resident Rockstar

    Hi Anonymous ,

    Have you solved your problem with the suggestion of Ani1991 ?

    If you have solved, please  always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

    If you still need help, please share the data sample which could reproduce your scenario so that we could have a test on it.

    Best  Regards,

    Cherry