Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am getting a 'No data to display' with what I have below. I have three categories and I need to do a count, not a sum. I first started with Pick, but looking at discussions, I saw something like this.
Dimension
=(ValueList('We Win','Matched','They Win'))
Expression
=IF(ValueList('We Win','Matched','They Win') = 'We Win',
Count(Min({$<SITE={$(=[Base Site)}>} FARE) - Min(FARE))<0,
=IF(ValueList('We Win','Matched','They Win') = 'Matched',
Count(Min({$<SITE={$(=[Base Site)}>} FARE) - Min(FARE))=0,
=IF(ValueList('We Win','Matched','They Win') = 'They Win',
Count(Min({$<SITE={$(=[Base Site)}>} FARE) - Min(FARE))>0,
)))
Thank you,
Martha
Try this
=If(ValueList('We Win','Matched','They Win') = 'We Win',
Sum(Aggr(If(Min({$<SITE={$(=[Base Site)}>} FARE) - Min(FARE) < 0, 1, 0), OBJECT)),
If(ValueList('We Win','Matched','They Win') = 'Matched',
Sum(Aggr(If(Min({$<SITE={$(=[Base Site)}>} FARE) - Min(FARE) = 0, 1, 0), OBJECT)),
If(ValueList('We Win','Matched','They Win') = 'They Win',
Sum(Aggr(If(Min({$<SITE={$(=[Base Site)}>} FARE) - Min(FARE) > 0, 1, 0), OBJECT)),
)))
Removed three extra parenthesis from here
That didn't work, I got an error. But I did find the solution and wanted to post it here.
pick(
match(ValueList('We Win','Matched','They Win'),'We Win','Matched','They Win')
,Sum( total Aggr( If((Min(SITE={$(=[Base Site])}>} FARE) - Min(FARE)) < 0, 1, 0), OBJECT))
,Sum( total Aggr( If((Min(SITE={$(=[Base Site])}>} FARE) - Min(FARE)) = 0, 1, 0),OBJECT))
,Sum( total Aggr( If((Min(SITE={$(=[Base Site])}>} FARE) - Min(FARE)) > 0, 1, 0), OBJECT))
)
Thank you so much for your help. I wouldn't have the answer without your help.
Martha