You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Well I have 2 problems: when trying to do this with a new column generated with count ($sum), not only does the filter section not appear in the result, but the whole column disappears:
here when adding ::filter to TotalProducts under $project the column (that would otherwise appear and work normally) is not present in the table at all.
The other issue I've found is when trying the filtering without "fields":
{
"collection": "DATABASE_NORMALIZZATO",
"aggregate":[{
"$project":{
"_id":"$_id",
"DESCRIZIONE AREA::filter":"$DESCRIZIONE AREA",
"DESCRIZIONE BENE DA OSPEDALE":"$DESCRIZIONE BENE DA OSPEDALE"
}
}]
}
here the filter section appears, but without using "fields", there are duplicates of both the filters and columns. i.e. instead of having 2 columns, DESCRIZIONE AREA and DESCRIZIONE BENE DA OSPEDALE, i have n*2 columns and n filters, where n is the number of rows found in the database (in my case 40 for testing). To avoid this you should use fields as far as I know but doing that simply doesn't show the filters nor the filtered column.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
On the website and help sections of redash, it says you have to project a column with the "::filter" keyword added to the end, like this:
Well I have 2 problems: when trying to do this with a new column generated with count ($sum), not only does the filter section not appear in the result, but the whole column disappears:
here when adding ::filter to TotalProducts under $project the column (that would otherwise appear and work normally) is not present in the table at all.
The other issue I've found is when trying the filtering without "fields":
here the filter section appears, but without using "fields", there are duplicates of both the filters and columns. i.e. instead of having 2 columns, DESCRIZIONE AREA and DESCRIZIONE BENE DA OSPEDALE, i have n*2 columns and n filters, where n is the number of rows found in the database (in my case 40 for testing). To avoid this you should use fields as far as I know but doing that simply doesn't show the filters nor the filtered column.
Beta Was this translation helpful? Give feedback.
All reactions