Display additional value on Enum Button

I have a table of movies with columns ‘movie title’ and ‘genre’. The view is a dashboard made up of a detail view and a deck. The detail view has the movie categories as enum buttons which the user can use to filter the deck.

Is it possible to have the enum buttons display the movie category and the count of movies in that category?

Yes it’s possible. Create a VC to concatenate the desired text first:

[Genre]&" ("&COUNT(MovieTable[Key], [Genre] = [_THISROW].[Genre])&")"

And then use this VC content to populate the ENUM buttons via Valid_if

[VirtualColumnName]
2 Likes

Brilliant. Thank you so much!

I’ve instituted your suggestion and it works perfectly, however, I should have also mentioned that users are able to edit genre’s, so the concatenated enum labels need to update as the users make changes. With your formula, when a row is edited, it makes a change to the Count for the genre of that row but not to the count of all of the rows in that genre (there’s a delay). Any way of making the VC update the Count for all rows in the category instantly?

The ENUM content can’t be edited by the user unfortunately. However if you switch the enum list’s expression from Valid_if to Suggested_Values, then the users will be able to type a new genre rather than editing the existing one. Ensure to check Auto-complete other values so that the newly typed/inserted genre will appear in the list next time.

I believe I couldn’t be able to understand this part. In general VC calculations are quick and there’s no delay as far as the data is in the back-end. Can you elaborate your issue here? May be with screenshots?

Hey @LeventK I misspoke, I didn’t mean users edit the genre’s, they are able to indicate whether they’ve watched the movie or not. The gif below shows a dashboard with the genre filter and then two deck views, Unwatched and Watched. The enum button is the concatenated genre+number in that genre with no user response. If you click the check mark, to indicate that you’ve watched the movie, it moves to the Watched deck and thus the number of movies in that genre should go down. As you can see, additional enum buttons are created because the underlying table with the concatenated Genre (count) isn’t updating fast enough.