Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
griffin2571
Contributor
Contributor

How to toggle between two different measures

I am trying to have my chart switch between two different set analysis. Currently the data set I have is being filtered based off of "Future Processing"

I have two set analysis but I am trying to switch between the two on the bar chart. Is there a way I can switch between these two expression for the bar chart below? The only thing I have seen as an option is a scatter plot chart but they only allow toggles on dimensions.

1) =Avg({<[Future Processing]={'Appointment'}>} [Time on-site])

2) =Avg({<[Future Processing]={'No Appointment'}>} [Time on-site])

Repair Site Future Processing Time on-site
Kuwait No Appointment 0
Kuwait No Appointment 0
Kuwait No Appointment 0
Kuwait No Appointment 0
Kuwait No Appointment 0
Kuwait No Appointment 0
Kuwait No Appointment 0
Kuwait No Appointment 0
Kuwait No Appointment 0
Kuwait Appointment 193
Kuwait Appointment 172
Iraq Appointment 215
Iraq Appointment 217
Iraq Appointment 218
Iraq Appointment 218
Iraq Appointment 218
Iraq No Appointment 218
Iraq No Appointment 219
Iraq No Appointment 145
Iraq No Appointment 145
Iraq No Appointment 145
Iraq No Appointment 145
Qatar Appointment 145
Qatar Appointment 145
Qatar Appointment 145

 

griffin2571_0-1669082236571.png

 

4 Replies
Mark_Little
Luminary
Luminary

HI,

Easiest way to do this with a chart is by using a container object, Use a expression to show and hid the each tabs and turn off the tabs at the top. Then end result appears the same to the end user.

Mario_De_Felipe
Luminary
Luminary

Have you tried "Alternative Measures"? You can switch between expressions

Also you can use a button to set value to the variable vAppointment (if(vAppointment='Appointment',No Appointment','Appointment')), build an expression something like this:

Avg({<[Future Processing]={'$(vAppointment)'}>} [Time on-site])

RahulGupta-HCL
Contributor II
Contributor II

In bar chart there is an option to add one measure as alternate measure

Step1 :

Create Measure 1 as =Avg({<[Future Processing]={'Appointment'}>} [Time on-site])

And alternate measure as =Avg({<[Future Processing]={'No Appointment'}>} [Time on-site])

RahulGupta_HCL_0-1669962870557.png

Step 2 : Select done editing

Step 3 : Select Exploration Menu

RahulGupta_HCL_1-1669962870584.jpeg

Step 4 : Toggle between the measures : Select the one you want to view data for

RahulGupta_HCL_2-1669962870607.jpeg

Pl see the attached document

Thanks
Rahul Gupta
Solution Architect- Data Engineering, Analytics & Data Science at HCL Technologies
williejacobs
Creator
Creator

Hi @griffin2571

You can do this by using a variable and buttons.

Create a Variable, the definition will be the default you would want your graph to display.

williejacobs_0-1669965206824.png

Change your formula to use the Variable
=Avg({<[Future Processing]={'$(vFutureProcessing)'}>} [Time on-site])

Now insert a variable input, I used the button option and link to the created variable.
Add your possible options

williejacobs_2-1669965837018.png

Selecting the different buttons will now change what is displayed on your graph.

williejacobs_1-1669965740724.png