I am trying to create a dashboard for the lab temperature data, the schema is as below The goal is to have a plot for all the data (y axis: all the PC06…data v.s x asis) and then use filter control to select only for exmple PC06_CH1-24 and its max and min data.
So I was trying to create a filter control with adding a field (Name:PC06) with code below as example:
CASE WHEN PC6_CH1_24 IS NOT NULL OR PC6_CH1_24_Max IS NOT NULL OR PC6_CH1_24_Min IS NOT NULL THEN ‘PC6_CH1_24_f’
WHEN PC6_CH2_48 IS NOT NULL OR PC6_CH2_48_Max IS NOT NULL OR PC6_CH2_48_Min IS NOT NULL THEN ‘PC6_CH2_48_f’
WHEN PC6_CH49_72 IS NOT NULL OR PC6_CH49_72_Max IS NOT NULL OR PC6_CH49_72_Min IS NOT NULL THEN ‘PC6_CH49_72_f’ END
then create a drop down filter control, select the control field to be PC06 but then it only shows the PC6_CH1_24_f to filter, and no PC6_CH2_48_f and PC6_CH49_72_f to select.
Would you please let me know how to improve this or have any other ways to filter?
CASE statements return the first TRUE result, so assuming the first condition is true you’ll never see the other results.
Maybe a simpler approach is to have a drop down filter on the group (the field that contains PC06…). To eliminate records with null MIN and MAX temperatures, you could add a filter property on the chart or page to exclude those.
Can I ask you how to create multiple drop dwon filter for different groups? When I tried to set up a control (drop down list), the control field only allows me to chose one group.
I am thinking I can create different field with different and addd into the control field, but i can only select one.
Drop-down control filters can be single-select or multi-select. Sounds like you need to switch yours to multi-select, which you can do on the Style tab.
Is “PC06_CH1-24” a dimension name or a value? If you’re trying to filter by different dimensions, you might look into using the dimension control:
“The dimension control lets report viewers change the dimension on one or more charts without needing to edit the report. Using a dimension control eliminates the need to create separate charts and reports to show related data and different levels of granularity.”
Alternatively, you might consider normalizing your dataset, but that might be a lot of work. What I mean is, instead of having each test group as individual dimensions, organize them into a test_group column, with metrics for your min and max temps. So it would like like:
date | test_group | min_temp | max_temp
2024-10-24 | PC06_CH1-24 | xx.xx | xx.xx
2024-10-24 | PC06_CH1-42 | xx.xx | xx.xx
etc.
This would make it much easier to query and visualize.