on 04-01-2016 3:44 AM
Greetings!
Hi my name is Manuel and i am from Mexico, i hope i could learn a lot about SAP with you guys.
This is my first post in this platform, excuse me if my english is not good enough to have a great fluency and have a good comunication with all you people.
I dont know if i could ask a question but i hope not having any kind of problem
Well, my problem is that i have the following formula
=If(Compare(ReportFilter([Query 2].[Month]);"*;*")=1)
Then [Month Acumulado 2] + " Acumulado "+Right([Query 2].[Year];4)
ElseIf (IsNull(ReportFilter([Consulta 2].[Month])))
Then "No Data "+Right([Query 2].[Year];4)
Else [Mes Individual 2]+" "+Right([Query 2].[Year];4)
This works with an input control but the result is not the expected and i don't know why!, i already check my variable values and it's ok.
When i change the value of input control, the result is fine but when i choose the option "All Values" it takes one month before the one that i want to display.
Instead of display "July Acumulado 2015" shows "June Acumulado 2015"
I almost could bet that is something easy to fix but i can not find it.
Thanks for the help and i hope making friends here.
Hi Manuel,
I didn't know there was function/operator called Compare in Webi, is that new or is that a mistake? If its new, what does Compare do?
=If(Compare(ReportFilter([Query 2].[Month]);"*;*")=1).......
May be you're looking for some other function? What are you trying to do in the first line of that formula?
Reportfilter([Query 2].[Month]) will give you 1;2;3 in the result if you've data for those 3 months, regardless of the year. On that note, what are you trying to do? If you're trying to see if there is data for Month = 1 then, try If([Query 2].[Month]=1) Then ... or if you want to see if there is data for more than one month, then try If(Count([Query 2].[Month]>1)) Then ...
Let us know what you're actually trying to do, so we can help you better.
Thanks,
Mahboob Mohammed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mahboob!
Thank for your reply, and yes it was my mistake i want to say "Match" instead of "Compare" but well yesterday i translate my formula wrong, sorry.
And well like i said to Niraj, i have 2 input controls but before to choose my selection on them i have a prompt and in that prompt i could choose those two months to make my comparison that i want to display like the image that i attached before but the problem is that it doesn't matter if in my second query option i choose the month number 7, 8 or 9 or X number, when i run my report in both places display the option that i chose for my first query.
Thanks in advance for your help.
Hello Victor,
I guess i got your issue the reason is in the bold part of your code below.
=If(Compare(ReportFilter([Query 2].[Month]);"*;*")=1)
Then [Month Acumulado 2] + " Acumulado "+Right([Query 2].[Year];4)
ElseIf (IsNull(ReportFilter([Consulta 2].[Month])))
Then "No Data "+Right([Query 2].[Year];4)
Else [Mes Individual 2]+" "+Right([Query 2].[Year];4)
When you select All Values the ReportFilter() is not going to be null instead its going to bring in all the possible options available for [Consulta 2].[Month] seperated by ";".
So you need to let us know the logic or tweak the logic as given below.
=If(Compare(ReportFilter([Query 2].[Month]);"*;*")=1)
Then [Month Acumulado 2] + " Acumulado "+Right([Query 2].[Year];4)
ElseIf (Pos(ReportFilterSummary();"No Filter")<>0)
Then "No Data "+Right([Query 2].[Year];4)
Else [Mes Individual 2]+" "+Right([Query 2].[Year];4)
Let me know if this helps
Regards
Niraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi! Niraj
Thank you for your response, i used your formula but isn't solve my problem.
The thing is that i have two input controls, in one i have 6 months and the other i have 7 months.
The first one works because when i choose "All Values" it displays "June Acumulado 2015" but when i choose the second input control it displays the same text! and it's wrong because i need to display "july acumulado 2015".
I attached a picture just in case it would help.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.