Forum Discussion
Use Calendar for Time Intelligence on another Table with Multiple Dates
- 2 years ago
gemcityzach Yeah, doesn't work that way other than perhaps overlaying two visuals but that's a mess. Better to create a measure for the closed count of ids like this:
Closed Count Measure = VAR __Date = MAX('Date'[Date]) VAR __Table = FILTER( ALL('Table'), [Closed Date] = __Date ) VAR __Result = COUNTROWS( __Table ) RETURN __Result
hey greg thanks for responding! those two options look nice but not quite what im looking for. sample data:
| ID | Group | Event_Type | Created | Closed | DueDate | PastDue |
| 1 | Group1 | A;C | 03/01/2024 | null | 03/15/2024 | Yes |
| 2 | Group2 | B | 03/15/2024 | null | 03/30/2024 | Yes |
| 3 | Group3 | A | 04/12/2024 | 04/18/2024 | 04/27/2024 | Yes |
| 4 | Group1 | B;A | 04/01/2024 | 04/18/2024 | 04/16/2024 | No |
| 5 | Group1 | A;B;C | 04/15/2024 | 04/18/2024 | 04/27/2024 | No |
Column Chart X: Month-Year Created
Column ChartY: Count of IDs
Line X: Month-Year Closed
Line Y: Count of IDs
gemcityzach Yeah, doesn't work that way other than perhaps overlaying two visuals but that's a mess. Better to create a measure for the closed count of ids like this:
Closed Count Measure =
VAR __Date = MAX('Date'[Date])
VAR __Table = FILTER( ALL('Table'), [Closed Date] = __Date )
VAR __Result = COUNTROWS( __Table )
RETURN
__Result- gemcityzach2 years ago
Helper IV
Hey Greg that worked pretty well for me to convert it to a stacked bar chart. But now none of my on-page slicers work. I'm guessing I need to figure out a way to keep the 'Group' filter?Edit: I changed FILTER ( ALL ) to FILTER ( KEEPFILTERS ...) and that worked! 🙂 Do you know how I might get the X-Axis to show Month-Year instead of MMM-DD?
- Greg_Deckler2 years ago
Community Champion
gemcityzach That's typically done in your formatting for the column.
- gemcityzach2 years ago
Helper IV
Yeah I checked for that but it doesn't offer the ability to 'group' the data into months. There are just variations on MM-DD-YYYY. I used the SQIBI calendar template (DAX Date Template - SQLBI).
- Greg_Deckler2 years ago
Community Champion
gemcityzach Also, you could have used ALLSELECTED instead of ALL