Hi, could you help me? How do I leave some filters...
# gd-beginners
Hi, could you help me? How do I leave some filters pre-selected for all users?
Hello Tomas, you will need to place your dashboard in edit mode and select the values from the filter that you want to be pre-selected for all users.
I put it in editing mode, but there is a message at the bottom stating that it will not remain as default.
Hi @Tomas Lima, please click on the pen icon (the middle one) that appears when you select the filter. This will open the filter in edit mode and the preview message will disappear. Check the image below (the image contains a bit different visual styling than yours)
🙌 1
👍 1
Thank you
I have a problem. The final result 177 is correct, but the value of each subgroup is incorrect. This occurs because on the same note I can have items in both the parts subgroup and the non-parts subgroup. Would there be any way to create a metric that would return this value without repetition where its sum would be 177?
Hi Tomas, as you correctly pointed out, this is because you most probably have a many-to-many relationship in your data model and your data allow one entity to have both “parts” and “non-parts” subgroup at the same time. Depending on your specific data model, there might be some way how to write a complex metric that will only count one of the groups (probably using … WHERE ROW_NUMBER(…) = 1 ). But it will just somehow randomly ignore one of the valid relationships in your data. So it is questionable how useful such metric would be. Another (and I think more meaningful) option (if you only have two subgroups) could be to use one metric defined as those having “parts” subgroup in it (no matter if they also have “no-parts”). And then a second metric would be just the difference between the overall total number and the first metric (resulting in number for those that do not have “parts” subgroup): with_parts_metric =
SELECT x WHERE subgrupo = 'PEÇAS'
without_parts_metric =
SELECT (SELECT x BY ALL OTHER) - with_parts_metric
is any metric or expression you are currently using to calculate the values. The
inner metric will get you the overall value. So with the values you have in the screenshot you should get: with_parts_metric = 112 (values that have “parts” in the subgroup data, they can also have “non-parts”) without_parts_metric = 177-112 = 65 (values that do not have “parts” in the subgroup data)