Forum Discussion
Dynamic count between dates. Total customers
- 1 year ago
Could you try these: (Ignore what I said before to use ALL)
1. Create a duplicate table of date as below (you can refine the columns if needed later, once you get the solution) and make sure in the model it is not connected to the transaction table "Contrato".
Date Table 2 = DateTable2. Add the date range slicer using Date column for the "Date Table 2"
3. Add this measure into your group
Contratos Activos 2 = VAR _Min_FilterDate = MIN('Date Table 2'[Date]) VAR _Max_FilterDate = Max('Date Table 2'[Date]) RETURN CALCULATE( COUNTROWS(Contrato), Contrato[FechaSalida] <= _Max_FilterDate, Contrato[FechaRetorno] >= _Min_FilterDate, REMOVEFILTERS('Date Table 2') )4. Add the table visual ( I added dummy date range visual to show the selected date range, which is not your requirement though)
ā
See if this helps!
Also, if what you are doing is inflight events or events in progress pattern.
then check this article for more details too: https://www.daxpatterns.com/events-in-progress/
I don't know spanish, have to google and understand the column names meaning.
Thankyou sevenhills
It looks good, I just need to validate if this is correct, but I guess because it includes the ALL funtion in filter, in the matirx on the right is not listing the 859 selected. any thoughts how I could confirm?
Active clients normaly are no longer than 30 days periods, so clientes from 2022 shouldn't be listed
PD: didn't work with ALLSELECTED, I used ALL instead as you recommended.
Thanks
pls. could you share the screenshot of the model linked between tx table and date table; and the formula used for the measure [Total Contratos]