关于Data Studio字符搜索图表展示及双自定义日期筛选的技术咨询
Hey there! Let's break down your two Google Data Studio questions with clear, actionable steps:
1. 字符搜索并在对应图表展示匹配结果
Absolutely you can do this! Here's how:
- First, add a Text Input control to your report: Click the "Add a control" button in the top toolbar, then select "Text Input".
- In the right-side configuration panel, link this input box to the text field you want to search through (e.g., a "Product Name" or "Customer ID" dimension).
- Your target chart will automatically filter to show only rows that match the keywords you type into the input box. For more precise fuzzy matching, you can create a calculated field in your data source using a regex formula like:
Then add this calculated field as a filter to your chart, setting the rule to "Equals true" — this will handle partial matches more flexibly.REGEXP_MATCH(Your_Field_Name, CONCAT('.*', @Your_Text_Input_Name, '.*'))
2. 设置两个非固定日期范围筛选器展示对应时段数据
Yep, this is totally achievable too. Follow these steps:
- Add two Date Range controls to your report, and rename them something clear like "Time Period A" and "Time Period B" so you can tell them apart.
- Create a calculated field in your data source (let's name it "In Target Periods") with this formula (replace
Your_Date_Fieldwith your actual date column):DATE BETWEEN @Time_Period_A_Start AND @Time_Period_A_End OR DATE BETWEEN @Time_Period_B_Start AND @Time_Period_B_End - Add this calculated field as a filter to your chart, and set the filter rule to "Equals true".
- Now when you adjust the date ranges in either of the two controls, your chart will only display data that falls within either Period A or Period B. Just make sure your date field's format aligns with the controls' date format to avoid any mismatches.
内容的提问来源于stack exchange,提问作者KMi
相关产品推荐
相关产品推荐

