filter-only-field on multiple dimensions

hello everyone, 

I have the need to apply a filter to a dashboard but it must be hidden, this means no user input.

The use case is that a number of tons is dispatched every month and forecasted for next month, there is no need to use a date filter on dashboard because i will always be looking at current month.

The second thing i need is to filter my measures by the last and current month, this is because i want to show a current vs previous table.

Instead of going measure by measure , i think there is a way of applying a filter-only-field to apply that filter to a X number of dimensions. is this possible ? can you help me ?

Example:

Month = January

Business Unit Current Month Previous Month
BU1 500 tons 468 tons
BU2 60 tons 100 tons

What i want to do is something like this:

filter: current_month {
type: string
sql: "2022-01"
}

filter: past_month {
type: string
sql: "2021-12"
}

measure: current_tons {
type: sum
sql: ${TABLE}.Ton;;
filters: [current_month] <-- this is my first filter-only-field
}

measure: previous_tons {
type: sum
sql: ${TABLE}.Ton
filters: [past_month] <-- this is my second filter-only-field
}

any ideas ??

0 0 167
0 REPLIES 0
Top Labels in this Space
Top Solution Authors