Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Kirsten
Creator II
Creator II

Expression error in Dimension for table selection

I would like to create a dimension to make a selected view (True) in a table . However the expression in the dimension turns an error while it is similar to another expression that is working. The field I am referring to (Exceeds) is a caculated field. What is wrong?

See attachment

1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

hi 

if Exceeds is calculated field than you need to replace him in the expression with the expression you use to calculate him 

the expression you wrote only work for fields that loaded to app 

not calculated dimension or master items 

View solution in original post

8 Replies
lironbaram
Partner - Master III
Partner - Master III

hi 

try : if(Exceeds='True',Exceeds)

Kirsten
Creator II
Creator II
Author

Hi @lironbaram  thanks. It still throws an error. I  think there is something strange

See attachment

albertovarela
Partner - Specialist
Partner - Specialist

It looks like the field "Exceeds" doesn't exist in your model. 

Kirsten
Creator II
Creator II
Author

Hi @albertovarela 

Thanks. It exists,  but it is a calculated field. How can I make an expression with a calculated field? Or is there another way I can make a selected view of the table?

See Exceeds available in the table in the attachment

albertovarela
Partner - Specialist
Partner - Specialist

Fields should show in orange font on the expression editor and as you can see on your screenshot it's showing black. Can you see it on the field selection area? 

Screenshot.jpg

lironbaram
Partner - Master III
Partner - Master III

hi 

if Exceeds is calculated field than you need to replace him in the expression with the expression you use to calculate him 

the expression you wrote only work for fields that loaded to app 

not calculated dimension or master items 

Kirsten
Creator II
Creator II
Author

Hi @lironbaram 

It works. Thanks!

Somehow it is a bit strange how it works because also calculated field is not available in "Fields" on the left side. Which means you can not drag the dimension to e.g. a filter. I can image you would need to use calculated fields in this way too

Kirsten

Kirsten
Creator II
Creator II
Author

Hi @albertovarela 

Thanks. Yes it was not visible because it is a calculated field. See post below