I posted a similar question about a year ago but the product has been evolving. I run into this issue a lot and hoping there is a nice way to solve it.
At the top of my dashboards I’ll often have KPIs. These require me to filter and do things to get the numbers but they represent a subset of data.
KPIs can’t be clicked on and then filter the data. Which is really what the users are after. I could put this data in a pie graph and then filter, but the users want to see these as specific numbers.
I have been messing around with tables where I filter, hide columns, borders, etc and can’t seem how to just get a number on the screen that I can then pass through as a filter to the rest of the visuals.
Hi @Derek_Sanborn,
To my understanding, you are able to apply actions to KPI visuals but the only value that’s handled by the action(s) would be the trend group field.
Based on your screenshot, I’m guessing some of your filtering has to do with dates, is there anything else going in to this filtering model that needs to be accounted for?
Depending on what else goes in to the filtering of these values; you can build a calculated field that creates time buckets (like your 0-30 days, 31-60 days, etc.). Then you could use that as your trend group allowing you to use an action.
So you could first build a calculated field to assign Days old:
’Days Old’: dateDiff(${Now}, {Order Date}, 'DD')
Then you can use this to create your buckets: ifelse( {Days Old} >= 0 and {Days Old} <= 30, ‘0-30 Days’, {Days Old} >= 31 and {Days Old} <= 60, ‘31-60 Days’, {Days Old} >= 61 and {Days Old} <= 90, ‘61-90 Days’, {Days Old} >= 91 and {Days Old} <= 120, ‘91-120 Days’, ’120+ Days’)
Let me know if this could work for your case or if you have any additional questions!
I have that calculated field in my data set. It does a date diff between today and invoice date. Which then puts it into 1 of the buckets just like you laid out.
I did not realize I could add this dimension to the KPI and not affect the layout. I tried this and it does indeed work.
However, clicking on the KPI seems a bit clunky. You have to be in the corner to get the mouse over which is okay but the bigger issue is once I click this and I apply the filter, I can’t unclick it and remove the filter. Not like with the other visuals. Any ideas what I’m doing wrong or is this how it functions?
Interesting, I see what you mean by being unable to remove the filter. (Side note, I had some success clicking on the actual wording of the trend group to set the action/filter in place so that may help with the first part).
In regards to removing the filter, I can think of two work arounds you could explore:
When publishing your dashboard, select the ‘more settings’ option and turn on Ad Hoc filtering:
If you have setup those calculated fields discussed above in your dataset (as opposed to in the analysis) you could accomplish through building a parameter and a work around button. The calculated fields would need to be at the dataset because QS does not allow you to build a parameter based on a calculated field’s values.
But essentially set up a Parameter for Time Bucket and set the default value to ‘ALL_VALUES’. No need to add a control for this as you don’t want to give your users the ability to adjust.
Next, we’ll build a visual we can use as a button. The way I do this would be to create a calculated field called ‘Reset’, like below:
Next, place this field in a table visual, then hide everything but the cell (so the title, header, outline, background and selection). This will present you with one box that you can resize and edit to serve as your button.
Now, setup your actions but instead of a filter action, setup as a navigation action as that allows you to connect a parameter. Setup to your time bucket parameter and for the ‘set parameter value’ option, choose your time bucket field.
(Make sure to change the filter on your visual(s) as well to equal your parameter value):
@Brett thank you for the detailed and thoughtful response. I also had more success clicking on the lower part. I think your solution may work for me in other areas but I think the behavior would be too inconsistent to users.
I have been experimenting with making a table with just 1 row and 1 column by filtering the value of the dimension I want and it works. Is there anyway to hide the row labels? This would work similar to a KPI because its just the 1 number but I’ve been unsuccessful in hiding the column. Any thoughts on this approach?
@Brett I was playing around with this again and got it to look better. I think I’ll end up going with a pivot table with 1 column and 1 cell. Here is the KPI, Table, Pivot table side by side to see the difference. The KPI is cleaner but I’m willing to live with the others to get the core functionality I was seeking!
Hi @Derek_Sanborn, Sounds good and I’m glad you were able to get some form of a work around to work! Additionally, you can hide the background to make it appear a bit cleaner as well!