Skip to main content
Announcements
The way to achieve your own success is the willingness to help somebody else. Go for it!
cancel
Showing results for 
Search instead for 
Did you mean: 
ektarathi
Contributor III
Contributor III

'GetCurrentField' Function not working with expression

Hi All,

I have created a Cyclic group named 'Period' and I have added three expressions to it to show Monthly, Quarterly and Annual data.

I have used this group on a bar graph, and I want bar graph title to change as per group selected. I use 'GetCurrentFiled' function whenever I want to find what value is selected in a group. But when I do it for this expression, I get error "Error: Error in Expression : ')' expected'. Can someone please help me with this. I am on QV 11 version.

Below is an example of what I am trying to do.

Cyclic group name : Period

First expression for group name Period : =date(If(MONTH_END_DT=InputDateVar or MONTH_END_DT=MnthVar1 or MONTH_END_DT=MnthVar2
or MONTH_END_DT=MnthVar3 or MONTH_END_DT=MnthVar4 or MONTH_END_DT=MnthVar5 or MONTH_END_DT=MnthVar6 or MONTH_END_DT=MnthVar7 or MONTH_END_DT=MnthVar8 or
MONTH_END_DT=MnthVar9 or MONTH_END_DT=MnthVar10 or
MONTH_END_DT=MnthVar11 or MONTH_END_DT=MnthVar12,MONTH_END_DT),'MMM yyyy')

Expression I used in bar graph to get correct Title :--

=If(GetCurrentField([Period])='=date(If(MONTH_END_DT=InputDateVar or MONTH_END_DT=MnthVar1 or MONTH_END_DT=MnthVar2
or MONTH_END_DT=MnthVar3 or MONTH_END_DT=MnthVar4 or MONTH_END_DT=MnthVar5 or MONTH_END_DT=MnthVar6 or MONTH_END_DT=MnthVar7 or MONTH_END_DT=MnthVar8 or
MONTH_END_DT=MnthVar9 or MONTH_END_DT=MnthVar10 or
MONTH_END_DT=MnthVar11 or MONTH_END_DT=MnthVar12,MONTH_END_DT),'MMM yyyy')', 'Monthly Graph')

3 Replies
ektarathi
Contributor III
Contributor III
Author

Hi All,

Any thoughts on this?

Thanks!

Anil_Babu_Samineni

Try to share sample?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
vishsaggi
Champion III
Champion III

May be try this?

=If(GetCurrentField([Period])= date(If(Match(MONTH_END_DT, $(InputDateVar),

                                                          $(MnthVar1),

                                                          $(MnthVar2),

  $(MnthVar3),

  $(MnthVar4),

  $(MnthVar5),

  $(MnthVar6),

  $(MnthVar7),

  $(MnthVar8),

  $(MnthVar9),

  $(MnthVar10),

  $(MnthVar11),

  $(MnthVar12)), MONTH_END_DT),'MMM yyyy'), 'Monthly Graph')



Ignore above and why don't you just use the below expression in your Chart

= $(=GetCurrentField([Period]))

Try this and switch the cyclic expressions you created.

Refer this too, might be helpful.

How to get the used expression?