Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to convert this into set expression. Is there a way to do it?
if([Pull Type]='M' or [As of Date] = '$(vmaxDate)', [As of Date])
Cheers!
If its your dimension, try this:
=Aggr(Only({<[Pull Type] = {'M'}> + <[As of Date] = {"$(=Date(Max([As of Date]), 'YourDateFieldFormat'))"}>} [As of Date]), [As of Date])
May be this:
=Only({<[Pull Type] = {'M'}, [As of Date] = {"$(vmaxDate)"}>} [As of Date]) or
=Only({<[Pull Type] = {'M'}, [As of Date] = {"$(=vmaxDate)"}>} [As of Date])
Sunny,
I tried this, but it didn't work, so came up with if syntax
Can you share a sample where it is not working? What is the expression for your variable vmaxDate? May be that is the issue.
vmaxdate = max(Date)
Only({$<[Pull Type] = {'M'} + [As of Date] = {"$(vmaxDate)"}>} [As of Date])
edit: The"+"-sign is used for OR in set analysis
Try this may be to find the max date where Pull Type = M
=Max({<[Pull Type] = {'M'}>} [As of Date])
I guess this expression returns the values for [As of Date] where [Pull Type] = {'M'} and [As of Date] = {"$(vmaxDate)"}
I need Date where [Pull type] = 'M' or [As of Date] = max([As of Date])
try using
Only({$<[Pull Type] = {'M'} + [As of Date] = {"$(vmaxDate)"}>} [As of Date])