Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want an expression like this.
=sum({<[Month] = {"April"}, Year = {"2012-13"}>}Data)
This works correctly but now I want month and year selected by the user from a list. I could have done it with GetFeildSelections() but I am using alternate States and GetFeildSelections() does not work with alternate states. So I used maxstring() function.
Having my state name as 'new', I did it as follows:
=sum({<[Month] = maxstring({[new]} [Month]),[Year] = maxstring({[new] [Year]})>}Data)
=sum({<[Month] = maxstring({[new]} [Month])>*<[Year] = maxstring({[new] [Year]})>}Data)
But its showing "error in set modifier element function name".
Then I tried creating variables for Month and Year as:
vMonth = maxstring({[new]} [Month]) and
vYear = maxstring({[new]} [Year])
still no correct output.
Anybody has a solution for this?
Thank you Perumal, your first expression worked correctly. I just have one more query. I am using listboxes to display different years and months. I have created a pivot table which changes its data based upon those selections.
But when I clear my selections, by default I have my pivot table loaded with the data of last values of the listboxes. What can be done for this??