Forum Discussion
alex9999
2 years agoHelper I
Create graph that includes all dates between a start and end date
Hi, I want to create a graph where my X axis has months of the year and my Y axis has count of items. The idea is to have the graph include all the months that the item has been hired, which is i...
- 2 years ago
try to create a date table
date = CALENDAR(min('Table'[Startdate]),max('Table'[enddate]))then create a measureMeasure = CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[Startdate]<=min('date'[Date])&&'Table'[enddate]>=max('date'[Date])))pls see the attachment below - 2 years ago
hi alex9999 You can try below dax and let me know if it works
Items Count =
VAR MinDate = MIN('OnboardOffboardTable'[start_date])
VAR MaxDate = MAX('OnboardOffboardTable'[end_date])
VAR CalendarTable = CALENDAR(MIN(MinDate), MAX(MaxDate))
RETURN
SUMX(
CalendarTable,
CALCULATE(
COUNTROWS('OnboardOffboardTable'),
'OnboardOffboardTable'[start_date] <= CalendarTable[Date] &&
'OnboardOffboardTable'[end_date] >= CalendarTable[Date]
)
)https://analyticpulse.blogspot.com
ryan_mayu
2 years agoSuper User
try to create a date table
date = CALENDAR(min('Table'[Startdate]),max('Table'[enddate]))
then create a measure
Measure = CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[Startdate]<=min('date'[Date])&&'Table'[enddate]>=max('date'[Date])))
pls see the attachment below