Forum Discussion
Drilling doesn't work
- 6 years ago
Please try this measure added to your table visual on the drillthrough page. I reproduced your scenario on my end and this appears to get your desired functionality.
IsActive = VAR mindate = MIN ( 'Date'[Date] ) VAR maxdate = MAX ( 'Date'[Date] ) RETURN CALCULATE ( COUNTROWS ( Employees ), ALL ( 'Date' ), OR ( Employees[EndDate] >= mindate, ISBLANK ( Employees[EndDate] ) ), Employees[StartDate] <= maxdate )If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
Hi mahoneypat,
Unfortunately that does not work, it creates the same problem as in my original post. It filters the Active Persons for that month only, when what is needed is the count of active persons that have a start date and no end date that are active in that month and every month where they are active (as your original measure successfully does) e.g:
person 1 has a start date in Jan 2020 and no end date, therefore needs to be counted in Jan, Feb, Mar, Apr, May, Jun, Jul, Aug.
person 2 has a start date in Mar 2020 and no end date, therefore needs to be counted in Mar, Apr, May, Jun, Jul, Aug.
person 3 has a start date in Mar 2020 and an end date in Jun 2020, therefore needs to be counted in Mar, Apr, May, Jun.
The next step is to be able to drill-through on that month (on the bar chart visualisation) and see who those active persons are for that month (in a table visualisation on another page)
Please see my post as I have edited it for clarity. The bar chart shows the correct numbers, however when I drill-through to a page with a table with persons on, it does not work.
Thanks again for your assistance Pat,
Dan.
Please try this measure added to your table visual on the drillthrough page. I reproduced your scenario on my end and this appears to get your desired functionality.
IsActive =
VAR mindate =
MIN ( 'Date'[Date] )
VAR maxdate =
MAX ( 'Date'[Date] )
RETURN
CALCULATE (
COUNTROWS ( Employees ),
ALL ( 'Date' ),
OR ( Employees[EndDate] >= mindate, ISBLANK ( Employees[EndDate] ) ),
Employees[StartDate] <= maxdate
)
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
- Anonymous6 years agoNot applicable
hi mahoneypat
this does not work either.
when i drill-through on a month, July2020 for example with 312 active persons, we drill-through to the page where the table shows list of persons with 'IsActive' measure under the 'Drill through' on the visualisation. It does not work because there is over 30,000 rows. This does not make sense when there are 312 active persons in the month.
Any ideas?
I appreciate your continued effort.
Dan.
- mahoneypat6 years ago
Microsoft Employee
The IsActive measure worked on my mockup file. Can you provide a pbix file that replicates what you are seeing and share a link to it? Not sure what else to try without that.
Regards,
Pat
- Anonymous6 years agoNot applicable
mahoneypat thanks so much, I started all over again and it works!!
Whatever trouble I was having before isn't there now. All working 😎