Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody, hope somebody can help with this.
I want to create a table with 2 rows. The first one should have the following expressions
Sum({$<Date={">=$(#vStartMonthDate)<=$(#vDate)"} >} [sales] )
the second one this one
Sum({$<Date={">=$(#vStartMonthDateLY)<=$(#vDateLY)"} >} [sales] )
When I select the field Date, let's say with 10/01/2015 the table would show something like this
the column row is a dimension I load inline, just to have two rows. and the expression would be
if(row=1, Sum({$<Date={">=$(#vStartMonthDate)<=$(#vDate)"} >} [sales]),
Sum({$<Date={">=$(#vStartMonthDateLY)<=$(#vDateLY)"} >} [sales] ))
les] )
I don't know if this is possible.
Thanks in advance
See attached qvw.
Thanks a lot Gysbert, you made my day. It works pretty good. Just one question. The problem were just the double quotes (")?
Regards
No, more likely the # that the variables start with. That required adding an extra # in front of them. That's because the # is also used to force a numeric evaluation of a dual value.
Ok but I don't get it because I had defined my variables without the #, like this:
vDate, vDateLY
and so on,
So with just one # should've been enough, or am I wrong?
Thanks for your time
If your variables don't start with an # then one # is enough to force the numeric evaluation. The double quotes work as well as single quotes. So I don't know why you were having problems.
Me neither, but I will follow your indications anyway.
Have a good day.