Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I just have one small issue ,
I have year dimension (listbox) that has three field Last year, current year and Last cycle.
i want my bar graph to set condition if nothing is selected then show last year data other depending upon user selection from filter.
Not really sure, What your intend here
If(GetFieldSelections(Year)>0, Sum(Sales), Sum({<Year = {'last year'}>} Sales))
Simply do this? Change accordingly
If(GetFieldSelections(Year)>0, Sum(Sales), Sum({<Year = {'$(=Max(Year-1))'}>} Sales))
but in your expression we are not giving by default Last year data otherwise depending upon user selection.
and my year field is basically character that says last year , current year or last cycle
Not really sure, What your intend here
If(GetFieldSelections(Year)>0, Sum(Sales), Sum({<Year = {'last year'}>} Sales))
Better you can do this way by writing two expressions and use a conditinal option in bar chart expressions.
Expression1:-
=SUM(Sales)
And
Conditional:-
=GetSelectedCount(Year)=1
Expression2:-
=Sum({<Year = {'$(=Max(Year-1))'}>} Sales)
And
Conditional:-
=GetSelectedCount(Year)=0
Apologies I got it , seems like I'm not in working mood:)