Conditional Group by.. Is it Possible?

Hi I have a report I want to group by two different  fields (one or the other) and Im using a parameter.. For example lets say the user picks State, then grouping would pick and do a total by state. Otherwise the user picks Country and it does a grouping and  total by country..

So currently it will group by country but not by states.. Is there anyway to do either or? Like a Conditional grouping so to speak?? thanks in adv.
shockaconAsked:
Who is Participating?
 
dougvargaConnect With a Mentor Commented:
Very Possible.

Create a formula called group1 - insert something similar to the following-

if {?myparameter} = "state" then {mydatabase.state} else
if {?myparameter} = "country" then {mydatabase.country} else "error"

Then just change your group to group on that formula!
0
 
shockaconAuthor Commented:
that worked! thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.