Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mrmatt
Contributor III
Contributor III

Filtering data from a chart

Hello, is there a way to filter certain data from a dimension in a chart I've created? I know it would be hard coded but that's ok. 

Appreciate your help.

Labels (2)
1 Solution

Accepted Solutions
Kushal_Chawda

try this

=aggr(maxstring({$<FieldName={"data name"}>}FieldName),FieldName)

View solution in original post

4 Replies
Vegar
MVP
MVP

You can filter your charts by using set analysis in your expressions. 

Let's say you want to only calculate sales for the northern region in 2019 you can do like this.

SUM({< Region={'Northern'}, Year={2019}>}[Sales amount])

mrmatt
Contributor III
Contributor III
Author

@Vegar  thanks I'm actually not doing a sum query.  I'm trying to exclude a certain data value from a string field.  How does this look to you? It's giving me an Invalid Dimension error:

=maxstring({$<FieldName={"data name"}>}FieldName)

Kushal_Chawda

try this

=aggr(maxstring({$<FieldName={"data name"}>}FieldName),FieldName)

mrmatt
Contributor III
Contributor III
Author

@Kushal_Chawda that worked great. I just had to add the minus to actually exclude that single data string.

=aggr(maxstring({$<FieldName= - {"data name"}>}FieldName),FieldName)