Select to view content in your preferred language

Dashboard Table - Filter out columns instead of entries

466
2
10-10-2023 09:34 AM
AbigailEbelherr
Occasional Contributor

I am wondering if there is a method of filtering out null columns in the Table widget on the dashboard and not the whole entry.  I have features on a map, and some of them have funding for two years while others have funding for three years.  When I select the ones that only have two years of funding, I want only those two years to be shown rather than the blank third year:

Screenshot 2023-10-10 113223.png

I need the Funding Year 3 column added to the table for those features that do have a third year, so I cannot remove it from the table.  When I try to use the filter options, it just removes the whole feature if Funding Year 3 is null instead of the column.

Any help is greatly appreciated.

 

0 Kudos
2 Replies
MobiusSnake
MVP Regular Contributor

I don't think there's a way to do this, but there might be a reasonably clean alternative.

You could use a Data Expression (written in Arcade) to convert your records to 2-or-3 distinct records, depending on whether it has two or three years' funding.

For example, if you had a record like this:

Year1Src1Amount1Year2Src2Amount2Year3Src3Amount3
2024A100002025B150002026C20000

 

You could convert it to this:

YearSrcAmount
2024A10000
2025B15000
2026C20000

 

Whereas if you only had the first six columns in your record, you'd end up with two rows in your result.

I think this would give your table a nice appearance, no gaping blank spaces, but how easy it will be will depend on how familiar with Arcade you are.

AbigailEbelherr
Occasional Contributor

Thank you for offering a solution.  I am not very familiar with Arcade.  We decided to go in a different direction with displaying the data, so this won't be needed for now, but I appreciate the help.

0 Kudos