Single Button / Action to set filter

Hello All..

I have a demo app that has 3 chart views (2 on the menu - one attached as an action to a column in one of the other views).  

In the Chart views there is a manual "Filter" option - see first screen shot below.

I have been asked to look into providing an "idiot proof" button for the users where, on click, it will filter data for the last 7 or 14 or 28 days (or reset filter) so that would be 4 buttons / actions in all.  

I can manually set a filter on the date and that filter then persists across all views (Perfect!) - 2nd screen shot.  

How can I take that one step further and have some actions that will set the filter parameters with preset values.  For example an action called "Weekly" that would set the date range from Today() to Today - 7.  Similar actions for 14 and 28 days and then to reset the filter.  These ideally would be actions that I can attach to the menu header or if necessary create a new view with just those filter actions in it (maybe a dashboard view). 

Any thoughts?

 

Thanks,

 

RoryF

 

 

RoryF_0-1643475386336.png

RoryF_1-1643475757188.png

 

0 5 692
  • UX
5 REPLIES 5

Thanks for the reply, but not sure if that helps much.  I am already using a Slice for my data and as far as I can see the filter conditions are set at design time.  What I am looking for is (A) A filter that can be set at RUNTIME by the user on an EXISTING data slice, where (B) that newly filtered slice is now the source for all other existing Views in the App..

I am experimenting with a virtual column that I can use to store which filter condition is set but I am not sure it will come to anything..

Regards,

RoryF

The filter condition is just an expression and it is meant to be dynamic. An example for your case would be:

AND(

   [date] <= TODAY(),

   [date] > TODAY() - 7

)

This is weekly slice. You can create similar slices for a different period, and you can even take it further and replace the 7 with a column value, instead of another fixed number. 

So I have part of it.. I created a virtual column and set the value to 7 (don't like using a virtual column as it is inefficient) called FilterDays.  And in the Slice I have:

AND([Hidden] <>1, [ShortDate] >= Today() - [FilterDays])

I think I will be able to get a value from another "Settings" table (haven't done this yet).  I don't see how creating different slices for different values can be done as all of the existing views are "bound" to an existing slice.  Can I chance the slice that a view uses at Runtime?

Thanks,

RoryF

 

You don't need a table. "FilterDays" can be an Enum column with values 7, 14, 28 or whatever, that the user will choose. 

Create an action with effect "Go to another view" and use LINKTOVIEW() from my first post in the formula field to show the slice. 

Top Labels in this Space