3 Replies Latest reply: Feb 25, 2016 11:35 AM by Stefan Wühl

# Straight Table Set Analysis Question

I have a straight table with multiple columns of dimensions and one column of an measure. The measure is simply an ID field with no aggregation, but a color expression. I have a field named CurrentFlag that I would like to use in set analysis. I only want to display rows where the CurrentFlag field value is 1. I tried adding set analysis to the expression like so: {<CurrentFlag={'1'}>}ID. However, this results in an error. Looking at another post I tried using: Only({<CurrentFlag={'1'}>}ID), which didn't result in an error, but it only hid the ID numbers and not the entire rows. Does anyone have a solution to hide the entire row if the flag is not 1? This must be handled in the front end.

Thanks.

• ###### Re: Straight Table Set Analysis Question

In general, use aggregation functions in expressions

Use Aggregation Functions!

Only() is an aggregation function, so that's what you probably should use here.

You can use set analysis only in aggregation functions, so that's one more reason to use one.

Now to your issue. I believe

Only({<CurrentFlag={'1'}>}ID)

Should filter your ID dimension, but maybe your color expression comes into play. How does it look like? Have you added a set expression also to your color expression?

• ###### Re: Straight Table Set Analysis Question

Yes I have a background color expression:

if(STATUS='Open',if(DaysOpen = 1, yellow(),if(DaysOpen > 1, red())))

• ###### Re: Straight Table Set Analysis Question

Try something like

if(Only({<CurrentFlag = {1} >}STATUS)='Open',if(Only({<CurrentFlag = {1} >}DaysOpen) = 1, yellow(),if(Only({<CurrentFlag = {1} >} DaysOpen) > 1, red())))