Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ellenblackwell
Partner - Contributor III
Partner - Contributor III

Exclude dimension values from table based on dynamic date selection

Hello Community,

I am trying to resolve a display issue that is driven by the time period selected by a user. Expression results based on the time period are working correctly. However, I am having trouble getting the proper dimension values to display based on the time period selected. How can I exclude Performer B/Organization 2 from the table below ?

Time Period Selected :Full Prior Month :3/1/19 - 3/31/19         
            
 PerformerOrganizationOrg Activated DateOrg Deactivated DateTransactions During Time Period Selected Display Performer?
 A13/15/201912/31/99990 Yes, because org active during a portion of the time period selected - regardless of 0 value in expression results
 B21/1/20192/15/20190 I want to exclude this row, because org was deactivated before min date in time period selected. But if I suppress 0 values, I lose the row above, too.
 C31/1/20193/15/201912 Yes, because org active during a portion of the time period selected
 D41/1/20194/5/201917 Yes, because org active over the full time period selected

 

Many thanks in advance!

Ellen

1 Solution

Accepted Solutions
Vegar
MVP
MVP

You need a loose calendar/date table. In my example the calendar contains a field called Date and a field called Month (among  others).

 

image.png

Expression

sum({< [Org Activated Date] = {"<=$(=max(Date))"}, 
[Org Deactivated Date] = {">=$(=min(Date))"}>}1)

You could of cource have another measure than SUM(1), but as long you keep this SET Modifier you will only get hits within the Org Activate-Deactivate period.

View solution in original post

2 Replies
Vegar
MVP
MVP

You need a loose calendar/date table. In my example the calendar contains a field called Date and a field called Month (among  others).

 

image.png

Expression

sum({< [Org Activated Date] = {"<=$(=max(Date))"}, 
[Org Deactivated Date] = {">=$(=min(Date))"}>}1)

You could of cource have another measure than SUM(1), but as long you keep this SET Modifier you will only get hits within the Org Activate-Deactivate period.

ellenblackwell
Partner - Contributor III
Partner - Contributor III
Author

Thank you Vegar!