Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ananyaghosh
Creator III
Creator III

is getSelectedCount() work for calculated dimension?

Hi,

I have a calculated dimension and based on the filed selection I populate a table. But I can see now that when I select that field it appears with expression and getSelectedCount() does not working. Please help.

Thanks,

Sandip

1 Solution

Accepted Solutions
prajwala
Contributor II
Contributor II

GetSelectedCount only works for Fields in your data model.

View solution in original post

5 Replies
tresesco
MVP
MVP

Do you have a file to share that demonstrates the issue?

ananyaghosh
Creator III
Creator III
Author

Hi,

when I am using this : =getselectedCount(DATE) and select a date , it gives me count. But when I use =getselectedCount(year(DATE)) and select a date value , it does not give me nothing.

shiveshsingh
Master
Master

Instead you can define year(DATE) in script and then use in textbox.

tresesco
MVP
MVP

That is because that function doesn't take calculated dimension as argument but a field name (or, to be precise, - 'or expression that gives a field name').

Untitled.png

Better create a Year field in the script and use that in the function.

prajwala
Contributor II
Contributor II

GetSelectedCount only works for Fields in your data model.