Forum Discussion
Count on Graph for values WithIn Dates
- Anonymous8 years ago
HI Anonymous,
You can't direct use these date column to achieve your requirement, please take a look at following link to know how to create a detail data table to store expand date range and use it to direct calculate with records in date range.
Reference link:
Spread revenue across period based on start and end date, slice and dase this using different dates
Sample table formula:
Detail person records = VAR _calendar = CALENDAR ( MIN ( Table[Start Date] ), MAX ( Table[End Date] ) ) RETURN SELECTCOLUMNS ( FILTER ( CROSSJOIN ( Table, _calendar ), Table[Start Date] <= [Date] && Table[End Date] >= [Date] ), "Person Code", [Person Code], "Date", [Date] )Notice: please don't forget to create relationship between new table and original table based on 'person code'.
Regards,
Xiaoxin Sheng
HI Anonymous,
You can't direct use these date column to achieve your requirement, please take a look at following link to know how to create a detail data table to store expand date range and use it to direct calculate with records in date range.
Reference link:
Spread revenue across period based on start and end date, slice and dase this using different dates
Sample table formula:
Detail person records =
VAR _calendar =
CALENDAR ( MIN ( Table[Start Date] ), MAX ( Table[End Date] ) )
RETURN
SELECTCOLUMNS (
FILTER (
CROSSJOIN ( Table, _calendar ),
Table[Start Date] <= [Date]
&& Table[End Date] >= [Date]
),
"Person Code", [Person Code],
"Date", [Date]
)
Notice: please don't forget to create relationship between new table and original table based on 'person code'.
Regards,
Xiaoxin Sheng
Hi there,
I was browsing on the internet and this is exactly what I needed, thank you. Now I would like to modify this for records that have an empty 'End Date', which I want to interpret as still active and therefore I would like to include them in a count. How would you do this?