Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

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 🙂 buttonsbuttons

 

5 REPLIES 5
v-piga-msft
Resident Rockstar
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

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ani1991
Resolver III
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,

image.png

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.
image.png

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. 
image.png

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

 

image.pngimage.png

Hope this helps!!

 

Thanks,

Ani

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 🙂  

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

Anonymous
Not applicable

Hi Ani,

 

i am not clear about how to enter vs GP & vs OP in the values inside the table , these are values (gp & op)  under a column named KPI in one of the tables in my data set. if there is another solution or clarification please lemme know 🙂 

 

 

thanks for ur support. 

 

omaima.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors