Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I am Using the following Expression:
=Sum({<[Revenue.Invoice Date] = {$(vCutoffDate)}>} [Revenue.Invoice Amount]/vMillion)
Its returning me an Error: ERROR in SET MODIFIER, ',' or ')' Expected.
Need Help..
if u comapare DD-MM-YYYY([Revenue.Invoice Date]) with your vCutoffDate DD-MM-YY you wont have a match.
Hi Alkesh,
Can you share the expression you are using in the variable? It will be helpful .
Regards
KC
Yes, Its ''DD-MM-YY' only, I did a typing mistake in the above reply..
Try this instead {'=(Date(vCutoffDate))'}
Try
if([Revenue.InvoiceDate] = vCutOffDate,Revenue.InvoiceAmount)
may give you more information on where its going wrong
could also show both Invoice date and vCutOffDate in the table along with the if statement.
Change both their default number type to decimal also, as this is what the comparison is on, the number value not the display value.
This can cause issue if a time component is still in a date value so make sure to floor() a date when only the date is important and remove the time or decimal component of the day.
Figures it out.. there was some date formatting problems. Thanx for your suggestion guys
Hi
This expression in a list box
=$(vCutoffDate)
expands to
=02-11-11
which QV interprets as 2 minus 11 minus 11 = -20
This is because the $() expansion is a text expansion only. It has not concept of data type. Compare that with
='$(vCutoffDate)' // ie with quotes
expands to
='02-11-11'
which Qv might interpret as a date (if DD-MM-YY is the default date format on your system). Otherwise, use
=Date(Date#('$(vCutoffDate)', 'DD-MM-YY'), 'DD-MM-YYYY') in a text box, or
....{"$(=Date(Date#(vCutoffDate, 'DD-MM-YY'), 'DD-MM-YYYY'))"} in a set expression filter.
HTH
Jonathan
Thanx Jonathan,
This was indeed helpful.