Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I could use some help and guidance here. I have a set of reports that I need a column to count a piece of data only if it meets a specifc condition. The field I need to count can contain several options, all text, but I would like to count only those matching one of them in a separate column.
I have tried an IF statement like this: =if([Price Source] = 'OV',textcount([Price Source]),0)
I have also tried to use an <> does not equal statement. The Price Source field and the Price Source Original fields can be the same unless someone overrode the suggested price, hence the 'OV' in the field I would like to count.
Right now it is set up as a expression in the table properties, but I am open to suggestions on how to make this work.
Thanks
Brian
=count({<[Price Source]={'OV'}>}[Price Source])
=count({<[Price Source]={'OV'}>}[Price Source])
The correct logic with "if":
=count(if([Price Source]='OV', [Price Source])
Please mark the answer as correct if it worked for you. It makes it easier for people looking for similar problems to find an answer.
Thanks Nicole, it was very helpful and worked like a charm. I do have one more challenge for you though. Obviously I am looking at pricing and sales data, and in both of the columns mentioned I have multiple options returned in the data base.
How can I modify the statement that you provided so that I continue to count the 'OV' items in the Price source column, but exclude any in the Price Source Original column that equal a specific value, Like 'P0'?
Thanks again for the help and direction.
Brian
=count({<[Price Source]={'OV'}, [Price Source Original] /= {'P0', 'P1'}>}[Price Source])
This will ignore anything in the Price Source Original column that has values 'P0' or 'P1' (you can add more to the list as desired).
I'm glad it was helpful!
Thanks, I will give it a try.