Ravindra BagaleCourses & study guides मराठी Track your progress

21. Dynamic Charts: Field Parameters, What-if and Dynamic Top N

21.6 Chart/Table Toggle (Recap)

Start with a problem

Ravina asks for the chart/table switch again on the parameters page.

Explain simply

The bookmark toggle (Module 19.4) works on any page: same fields in both visuals, Data off, Selected visuals.

Show the data

City Total Sales (₹)
Pune 850
Nashik 800
Kolhapur 450
Total 2,100

About this data: This table uses columns: City, Total Sales (₹). This table uses columns: View, Pune, Nashik, Kolhapur. This table uses columns: Wrong result, Reason, Correction. Values shown are the lesson examples already on this page (not a new dataset).

Fictional sample data. Practice file: visuals_orders_apr_may_2026.csv (source: src/practice/).

Demonstrate

  1. Duplicate the chart; convert the copy to a table.
  2. Stack them; create Chart view and Table view bookmarks (Data off, Selected visuals).
  3. Add two buttons calling the bookmarks.
  4. Pick Total Orders in the Metric parameter; toggle.

Show the result

Chart and table bookmark states, sample layout with fictional data

Your result should look like this (fictional sample):

View Pune Nashik Kolhapur
Chart (Total Orders) 3 3 2
Table (Total Orders) 3 3 2

Explain what happened

Both visuals use the field parameter, so the metric choice applies to both; the bookmark only switches visibility.

Explore further

  • Test the toggle with every metric.

Detailed reference for this lesson:

A classic dynamic-chart pattern is two visuals in the same place, shown/hidden with bookmarks and buttons. Module 19.4 has the full steps. Combine it with field parameters: the chart and the table both use Metric Selector, so one slicer drives both views.

Practice task

Look: build a "Dynamic Explorer" page: a Metric Selector (Sales, Orders, AOV, Avg Delivery), an Axis Selector (City, Category, Payment Mode, Order Hour), a Top N slider for the bar chart, a what-if slider for Target Delivery Minutes with % Orders Under Target, and a chart/table toggle. Add a dynamic title that names the metric and axis chosen.

Ravindra Bagale's Tip

Friends, many students keep both the chart and the table visible behind each other, which slows the page because both still run queries. Hidden visuals don't run queries, so make sure the bookmark actually hides one of them. Never forget this.

Fix common mistakes

Wrong result Reason Correction
Table shows Total Sales while chart shows Orders Table uses a fixed measure Use the parameter field in both
Metric slicer reset by toggle Data On Data Off
Buttons overlap visuals Layout Reserve a toolbar area

Practise independently

Practice task

With Avg Delivery Mins selected, what does the table show for Kolhapur?

Hints
  • Delivered only.
Solution

7.0.

Think like a professional

Reusing a tested pattern saves time and keeps the report consistent.

Ravi Sir's Cards for this lesson

मराठी cards