Forum Discussion
chart with start and end date
- Anonymous8 years ago
Hi jeffr,
You can try to use below formula to generate the detail date table, then build relationship between original table and new table. After these steps, you can use new date form new table as the axis and drag id to value field with summary mode count.
Original table:
Sample:
Detail = VAR temp = SELECTCOLUMNS ( 'Sample', "Index", [Index], "StartDate", [StartDate], "EndDate", [EndDate] ) VAR vCalendar = CALENDAR ( MINX ( temp, [StartDate] ), MAXX ( temp, [EndDate] ) ) RETURN SELECTCOLUMNS ( FILTER ( CROSSJOIN ( temp, vCalendar ), [StartDate] <= [Date] && [EndDate] >= [Date] ), "Index", [Index], "StartDate", [StartDate], "EndDate", [EndDate], "Detail", [Date] )Expand tableRelationship
Create line chart with above columns:
Regards,
Xiaoxin Sheng
Hi jeffr,
You can try to use below formula to generate the detail date table, then build relationship between original table and new table. After these steps, you can use new date form new table as the axis and drag id to value field with summary mode count.
Original table:
Sample:
Detail =
VAR temp =
SELECTCOLUMNS (
'Sample',
"Index", [Index],
"StartDate", [StartDate],
"EndDate", [EndDate]
)
VAR vCalendar =
CALENDAR ( MINX ( temp, [StartDate] ), MAXX ( temp, [EndDate] ) )
RETURN
SELECTCOLUMNS (
FILTER (
CROSSJOIN ( temp, vCalendar ),
[StartDate] <= [Date]
&& [EndDate] >= [Date]
),
"Index", [Index],
"StartDate", [StartDate],
"EndDate", [EndDate],
"Detail", [Date]
)
Expand tableRelationship
Create line chart with above columns:
Regards,
Xiaoxin Sheng
- Anonymous2 years agoNot applicable
Thanks Anonymous. This method works but the only issue I have is the data label in the Y axis duplicates excatly 4 times, not sure why, though the numbers are correct (screenshot attached). Any lead how to resolve this? Thanks!