I have a table with two columns of dates and associated sales values for different stores. So, a store can have multiple date values with sales values associated with them.
Store# Date1 Date2 SalesValue
1 02/21/2017 02/21/2017 22
1 02/18/2017 02/18/2017 13
2 02/19/2017 02/19/2017 40
2 02/21/2017 02/21/2017 22
I would like to get the rows where the latest date1 is >= latest date2 and sales value = 22.
So, I should end up with:
1 02/21/2017 02/21/2017 22
2 02/21/2017 02/21/2017 22
I tried to do the following but it did not work:
IF(MAXA(Date1) >= MAXA(Date2) && Sales = 22, "You got this", "You didnt)
I am getting an error which says: A snigle value column Sales in table "Sales" cannot be determined. This can happen when a measure or formula refers to column that contains many values without specifying an aggregation such as min,max, etc.
If I put a MAX around Sales, then it's grabbing the max values instead of 22. How can I get those two columns?