Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
davyqliks
Specialist
Specialist

If Max Date as expression issue

Hi,

I am trying to make a dimension (so i can not show null values) for an if statement with max date else alternate field.

I have my dates in a standard format YYYY-MM-DD and another field called NA Date which is for the bulls in my date field.

for the image below i would expect to see 1 date - 2022-08-01 and for the Not Applicable standards (last field) the value No Expiry Date.

 

As you can see i have both Dates and not the max date for the Expiry Date field.

 

I am using the following:

=Aggr(if([Expiry Date2] = Max([Expiry Date2]) ,[Expiry Date2],[NA Date]),standard_name,[Expiry Date2],name)

davyqliks_0-1661875441934.png

when i make another table with only the Measure -  Max Date:

max(Date([Expiry Date2]))

I see the single date expected and null against the standards where i need to insert the NA Date.

davyqliks_1-1661875861613.png

 

Can anyone assist with my expression to have only the max date and the alternate field, Aggregated by the given fields, as a dimension so i can not show the nulls?

Thank you so much for your help in advance, i have been going round in circles looking at this.

Regards,

 

Daniel

 

 

Labels (2)
1 Reply
BrunPierre
Master
Master

It would be helpful to look at a sample of the data.