Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
divya_anand
Creator III
Creator III

neglecting selections in a particular field without using set analysis?

I have created a bar chart in which [Month-Year] is the Dimension & the expression is as shown below-

=Count(DISTINCT Aggr(If((STATUS<>'CNCL' AND COMPLETED >= MonthStart(Max(Date)) and Match(Type, 'Scheduled','Completed')),
CODE), Month, CODE, COMPLETED, SCHEDEND, Type))

Now when a selection is made in the list box "Month", the data only with respect to that month is shown in this bar chart. How do I make any selections made in month/year/[Month-Year] not effect this chart?

Using set analysis will work, but since I am using Aggr function here, not sure how to fit this in. Does anybody have an idea on this?

Thank you.

4 Replies
vinieme12
Champion III
Champion III

=Count({<Month>}DISTINCT Aggr(If((STATUS<>'CNCL' AND COMPLETED >= MonthStart(Max(Date)) and Match(Type, 'Scheduled','Completed')),
CODE), Month, CODE, COMPLETED, SCHEDEND, Type))

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
stabben23
Partner - Master
Partner - Master

something like this could work for you.

=Count(DISTINCT Aggr({<STATUS-={'CNCL'} , COMPLETED {">=$( MonthStart(Max(Date)))"} , Type={ 'Scheduled','Completed'},Month, Year,[Month-Year] >} CODE), Month, CODE, COMPLETED, SCHEDEND, Type))

without set analysis! sorry.

sunny_talwar

May be this:

=Count({<Month, Year, MonthYear>}DISTINCT


Aggr(


If(Only({<Month, Year, MonthYear>}STATUS) <> 'CNCL' and

    Only({<Month, Year, MonthYear>}COMPLETED) >= MonthStart(Max({<Month, Year, MonthYear>}Date)) and         Match(Only({<Month, Year, MonthYear>}Type), 'Scheduled','Completed'),


Only({<Month, Year, MonthYear>}CODE))


, Month, CODE, COMPLETED, SCHEDEND, Type))

Kushal_Chawda

Try to convert entire expression in set analysis as complex if condition may give you performance issue, try below expression

Sum({<Month, Year, MonthYear>}aggr(Count(DISTINCT {<Month, Year, MonthYear,STATUS-={'CNCL'} ,COMPLETED ={">=$(=MonthStart(Max(Date)))"} ,Type={'Scheduled','Completed'}>}CODE), Month, CODE, COMPLETED, SCHEDEND, Type))