Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
tchovanec
Creator II
Creator II

Ignore Selections

I have the following expression and I would like to ignore the ISLAND_DEPT.DEPT_DESC selection and show the data for all depts.

SUM(AGGR(IF(FirstSortedValue(
{<
ADMIT_DT ={">= $(=NUM(ADDMONTHS(MONTHSTART(MAX(ISLAND_CALENDAR.DATE)),-12))) <=$(=MAX(ISLAND_CALENDAR.DATE))"},
FLG_Z_PATIENTS = {0},
>}
DISTINCT DEPT_ABBR,-ADMIT_DTTM)= ISLAND_DEPT.DEPT_ABBR,1,0),MRN,ISLAND_DEPT.DEPT_ABBR))

  I have tried the following without any success.

SUM(AGGR(IF(FirstSortedValue(
{1<
ADMIT_DT ={">= $(=NUM(ADDMONTHS(MONTHSTART(MAX(ISLAND_CALENDAR.DATE)),-12))) <=$(=MAX(ISLAND_CALENDAR.DATE))"},
FLG_Z_PATIENTS = {0},
ISLAND_DEPT.DEPT_DESC=
>}
DISTINCT DEPT_ABBR,-ADMIT_DTTM)= ISLAND_DEPT.DEPT_ABBR,1,0),MRN,ISLAND_DEPT.DEPT_ABBR))

Any idea why adding the 1 or ISLAND_DEPT.DEPT_DESC does not work. Any ideas on how to get this to work would be greatly appreciated. Thank you.

20 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

You should use it the Sum too

Try this

SUM({< ISLAND_DEPT.DEPT_DESC= >}

AGGR(IF(FirstSortedValue(
{<
ADMIT_DT ={">= $(=NUM(ADDMONTHS(MONTHSTART(MAX(ISLAND_CALENDAR.DATE)),-12))) <=$(=MAX(ISLAND_CALENDAR.DATE))"},
FLG_Z_PATIENTS = {0},
ISLAND_DEPT.DEPT_DESC=
>}
DISTINCT DEPT_ABBR,-ADMIT_DTTM)= ISLAND_DEPT.DEPT_ABBR,1,0),MRN,ISLAND_DEPT.DEPT_ABBR))

tchovanec
Creator II
Creator II
Author

That still returned only the 1 selected department and not every dept.

Anonymous
Not applicable

Thomas,

Are you using this expression in a chart?  If so, the dimensions of the chart may be dependent on this selection.

tchovanec
Creator II
Creator II
Author

I am using it in a straight table and the only dimension I have is the ISLAND_DEPT.DEPT_ABBR

Anonymous
Not applicable

Try to check "show all values".  If it doesn't help, need to see your file...

Anonymous
Not applicable

50 MB is too much...

Could you please upload a reduced version?  One MB or less?


tchovanec
Creator II
Creator II
Author

I have attached an updated version. What I would like to happen is when a dept is chosen from the list box the table will still show all the dept values. Thank you for the assistance.

Anonymous
Not applicable

Thomas,

If follow your requirement literally, it is enough to uncheck "suppress zero-values" on Presentation tab, and to check "show all values" on Dimensions tab.  Makes sense to check "suppress when value is null" to remove the "-".

But if you make selection in the list box, all expression values except for the selected dimension value will be 0.  Is it OK or not?  If not, and you want to ignore selection completely, the painless solution is to use alternate set.  That is, the list box and the chart will be completely mutually independent.

Regards,

Michael

tchovanec
Creator II
Creator II
Author

Having all the other values be 0 is not what I would be expecting. So I choose PCR as the dept. abbr I would expect to see 1 for PCR and 2 for WHCY still.