Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to write an IF() that will return a value when a field within a group is selected. So I have something along the lines of whats below. However, the function is returning Sum(Sales) when any field in Annual Analysis is selected, not just 2015 YTD like I want. Any suggestions? Thanks in advance.
=IF(GetCurrentSelections([Annual Analysis]) = '2015 YTD', Sum(Sales)))
Try this:
=If(WildMatch(GetFieldSelections([Annual Analysis]), '2015 YTD'), Sum(Sales))
Try this:
=If(WildMatch(GetFieldSelections([Annual Analysis]), '2015 YTD'), Sum(Sales))
Yes that worked! how does WildMatch work?
If You haveDimension [Annual Analysis] in Your Group try
If(GetCurrentField(YourGroup)='Annual Analysis',Sum({<[Annual Analysis]={'2015 YTD'}>} Sales))
Not entirely sure what you are doing and how you data looks. if what ANTONIO said did not work, would you be able to share a sample?
Best,
Sunny
I spoke too soon, =If(WildMatch(GetFieldSelections([Annual Analysis]), '2015 YTD'), Sum(Sales)) worked. How does WildMatch work?
Here is an image from QV Help page:
I hope this will clarify things.
Best,
Sunny