Forum Discussion
bikram_laishram
8 years agoHelper I
Custom Count from a date range
Hello Folks, Merry X'mas & Happy New year. I have a table where we have two date columns i.e. "from Date" and a "to date" column. How do I create a DAX measure or query to get count of ves...
- 8 years ago
Hi bikram_laishram,
Did you try out my solution? It should work. You need a time line slicer from the Store. Please check the file here. (don't create relationship between two tables).
Best Regards,
Dale
v-jiascu-msft
8 years agoMicrosoft Employee
Hi bikram_laishram,
The final result isn't clear. Maybe you can try it like this. You can check it out in this file in which I create two possible result.
1. A date table without relationship to other table.
Calendar = CALENDARAUTO()
2. Create a measure.
Result =
CALCULATE (
COUNT ( 'Table1'[Vessel_Name] ),
FILTER (
'Table1',
'Table1'[Primary_Manager_Valid_From] <= MIN ( 'Calendar'[Date] )
&& 'Table1'[Primary_Manager_Valid_To] >= MAX ( 'Calendar'[Date] )
)
)
Best Regards
Dale