Show the amount of items on a button

Hi there,
Could the number of items in a slice be shown in the Display name of a view so that it shows the amount in the button on the Primary Views bar?
How could I do the expression to count the items on the slice?
In the image I show the desired effect

1 2 286
2 REPLIES 2

Hi @TalkNet_TechnoStore,

You may do so by having display name of the view โ€œPedidosโ€ something like below

CONCATENATE(โ€œPedidosโ€,"(",COUNT(SELECT(Table Name[Key Column], Slice Filter Condition)),")")

Here โ€œPedidosโ€ is your view name , โ€œTable Nameโ€ is the name of the table on which your slice for โ€œPedidosโ€ view is based and โ€œSlice Filter Conditionโ€ is the same filter condition that you have for slice โ€œPedidosโ€. Ths same slice filter condition you may use in the SELECT () statement given above.

An example shown below

2X_f_f471e34d927857d084530e29d874bb978d511fac.png

Great!! Thank you so much.
I thought Expressions that use columns could not be used, due to the notice that says:
โ€œThis formula is not evaluated in the context of a row, so column values are not available.โ€
And I didnโ€™t think that a simple SELECT would work.

Top Labels in this Space