QlikSense中如何创建类Tableau的参数驱动图表?
Got it, let's walk through exactly how to create that dynamic exchange rate-driven chart you're asking for. I'll break it down into simple, actionable steps:
1. Create a Variable to Store the Exchange Rate
First, we need a variable that'll hold the EUR-to-INR rate users input. Here's how:
- Open your Qlik Sense app and switch to Edit mode.
- Click the Variables panel (left sidebar, looks like a
{ }icon). - Click Create new variable, name it something clear like
vEURtoINR(you can useXif you prefer, but descriptive names avoid confusion later). - Set an initial value (e.g., 78) so the chart loads with a default rate when users open the sheet.
2. Add a User Input Control for the Parameter
Next, let's give users an easy way to adjust this rate. A dropdown list is ideal since you have specific values (78/79/81/91):
- In Edit mode, go to the Add control menu (top bar) and select Dropdown list.
- In the dropdown's properties panel:
- Under Data, set Variable to
vEURtoINR(or your chosen variable name). - Under Options, click Add option and input each rate value (78, 79, 81, 91) one by one. You can label them the same as the values for clarity.
- Drag the dropdown to a visible spot on your sheet (like the top corner) so users can find it easily.
- Under Data, set Variable to
3. Write the Dynamic Sales Calculation Expression
Now we need to calculate the Thousand EUR Sales Total using the variable. Assuming your raw sales field is named Sales (adjust this to match your actual field name):
- The formula we need is:
Sum(Sales) / (vEURtoINR * 1000)Sum(Sales)grabs the total INR sales for each company.- Dividing by
vEURtoINRconverts those INR values to EUR. - Dividing by 1000 scales the result to thousand EUR, as requested.
4. Build the Chart
Finally, put it all together into the dynamic chart:
- In Edit mode, add a Bar chart (or Column chart) to your sheet.
- Under Dimensions, add your
Companyfield. - Under Measures, click Add measure and paste the expression from step 3.
- Rename the measure to something user-friendly, like Thousand EUR Sales Total.
- Tweak the chart's appearance (colors, labels, axis formatting) to match your needs.
Test It Out
Switch to View mode, select different exchange rates from the dropdown, and watch the chart update instantly as the variable changes!
Quick Tips
- Double-check that your
Salesfield is stored as a numeric type (Qlik Sense might throw errors if it's saved as text). - If you prefer a free-text input instead of a dropdown, use an Input box control instead—just bind it to the same variable.
内容的提问来源于stack exchange,提问作者Neelanjoy B

