Forum Discussion
Line Chart with two diffrent dates on x-axes
- 6 years ago
Hi PhiBu ,
To solve this issue you need to create a calendar table and use that as your x-axis value.
Now change your measures to:
Cumulative_issues_created = CALCULATE( COUNT('Jira'[Key ]); FILTER(ALL(Jira[Date_created]); 'Jira'[Date_created] <= MAX('Calendar'[Date])) ) Cumulative_issues_resolved = CALCULATE( COUNT('Jira'[Key ]); FILTER(ALLSELECTED(Jira[Date_resolved]); 'Jira'[Date_resolved] <= MAX('Calendar'[Date]) && Jira[Date_resolved] <> BLANK()) )I'm assuming that the Created date does not have blank values.
Check PBIX file attach (file in April version).
- Anonymous6 years ago
Hi PhiBu,
You can also try to create a calculated table to expand date range and link to raw table records(key field), then you can use new table date fields with raw table value fields to calculate the count of records between date range:
Expand = VAR _calendar = CALENDAR ( MIN ( Jira[Date_created] ), MAX ( MAX ( Jira[Date_resolved] ), TODAY () ) ) RETURN SELECTCOLUMNS ( FILTER ( CROSSJOIN ( Jira, _calendar ), Jira[Date_created] <= [Date] && IF ( Jira[Date_resolved] <> BLANK (), Jira[Date_resolved] >= [Date], TODAY () >= [Date] ) ), "Key", [Key], "Date", [Date] )Spread revenue across period based on start and end date, slice and dase this using different dates
Regards,
Xiaoxin Sheng
Hi PhiBu ,
To solve this issue you need to create a calendar table and use that as your x-axis value.
Now change your measures to:
Cumulative_issues_created = CALCULATE(
COUNT('Jira'[Key ]);
FILTER(ALL(Jira[Date_created]);
'Jira'[Date_created] <= MAX('Calendar'[Date]))
)
Cumulative_issues_resolved = CALCULATE(
COUNT('Jira'[Key ]);
FILTER(ALLSELECTED(Jira[Date_resolved]);
'Jira'[Date_resolved] <= MAX('Calendar'[Date]) && Jira[Date_resolved] <> BLANK())
)
I'm assuming that the Created date does not have blank values.
Check PBIX file attach (file in April version).