Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
In our area (im not from IT) we developed an application in a professional version 8.5. The fact is that right now the version running in the server is 8.2, so all our coding with set analysis do not work when anyone with an Analyzer tries to see it from the server.
We need a quickly solution while IT makes the server upgrade , but we need to have this application on the server as soon as possible.
Is not a complicated task but i could do the following just using Set Analysis and not "IF". Even though i managed quite well on designing the application, im not from IT and im not an advanced coder.
In some charts we need the possibility of selecting a Main Month and also a Vs. Month. We are using two input boxes associated with variables.
Mes: Select one month
Mes Vs.: Select comparison month
The time dimension of the uploaded that is called "Date"
Here's an example of the coding used
[Code]
(
Sum({$<[Date]={$(mes)}>} [Vol Ucs]) - Sum({$<[Date]={$(Mes Vs)}>} [Vol Ucs])
Thank you in adv.!
Nico
It appears that your set analysis is simple enough that it can be replaced with an IF.
sum(if(Date=mes,[Vol Ucs])) - sum(if(Date=[Mes Vs],[Vol Ucs])
The big downside of using IFs is performance. But if you'll be ugrading soon, it probably won't be worth trying to figure out a better solution, since the better solution is to go to version 8.5.
Thank you John for your Replay.
I try that and it work only when I've got the same month selected in the month's filter.
for example.
Month variable value = 09 May
If i dont select a month in the Date , nothing appear on the expression.
Can I use a variable to make the selection?
Could you use IsNull on the variables to take care of that?
sum(if(Date=mes Or IsNull(mes),[Vol Ucs])) - sum(if(Date=[Mes Vs] Or IsNull([Mes Vs]),[Vol Ucs])
That way, if nothing is selected, it will pull for every Date. I'm guessing it should also work if one variable has a value, but the other does not.
you should be able to use variable in the IF formula:
if(Date = $(mes), ...
Just check how your variable is being populated. If it's populated when the month is selected from the list box - that's the reason for such behavior.
Oleg