- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Show trend analysis on a line chart
I have two tables one is incident table and other table is incident postmortem table.
Both the tables are having Id and date time column and these tables are not related. Now, i want to represent them in a line to see the trend for last 6 months till today in a line chart and axis will be my month and values will be the count of ticket ids for both the tables. How can i acheive this, please throw some insights.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @sarath5140 ,
You can create a calendar table as axis of line chart, then write a measure to lookup and summary records from two tables based on current calendar date and use in value fields. After these, you can enter to analytics panel and turn on trend line features.
If you are confused on coding formula, please provide some sample data with expect result to help us clear your requirement and do test and coding formula on it.
Regards,
Xiaoxin Sheng
If this post helps, please consider accept as solution to help other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi v-shex-msft,
Thanks for your reply. Please find my below tables data.
Table A : Incident Table
IncidentId | CreationDate | Status |
10605331 | 2/28/2019 4:16:58 PM | INPROGRESS |
10500578 | 2/28/2019 3:52:21 PM | INPROGRESS |
10500558 | 1/10/2019 3:52:21 PM | INPROGRESS |
10697056 | 09/21/2018 3:46:16 PM | INPROGRESS |
10635516 | 2/28/2019 3:30:45 PM | INPROGRESS |
Table B : Postmortem Data
IncidentId | SourceCreateDate | Status |
8193170 | 2019-02-28 16:48:01.0000000 | RESOLVED |
4058843 | 2018-02-28 16:48:00.0000000 | ACTIVE |
405884398 | 2019-01-27 16:48:00.0000000 | RESOLVED |
81930031 | 2018-02-21 16:48:00.0000000 | ACTIVE |
Please help me with the Dax formulas and measures and to acheive the trend for both the tables to show the incidentid count vs month trend in line chart.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HI @sarath5140 ,
You can take a look at following sample.
Measure formulas:
InProgress = VAR currDate = MAX ( 'Calendar'[Date] ) RETURN CALCULATE ( COUNTROWS ( VALUES ( Incident[IncidentId] ) ), FILTER ( ALLSELECTED ( Incident ), [CreationDate] >= DATE ( YEAR ( currDate ), MONTH ( currDate ) - 6, DAY ( currDate ) ) && [CreationDate] <= currDate && [Status] = "INPROGRESS" ) ) Resolve = VAR currDate = MAX ( 'Calendar'[Date] ) RETURN CALCULATE ( COUNTROWS ( VALUES ( Postmortem[IncidentId] ) ), FILTER ( ALLSELECTED ( Postmortem ), [SourceCreateDate] >= DATE ( YEAR ( currDate ), MONTH ( currDate ) - 6, DAY ( currDate ) ) && [SourceCreateDate] <= currDate && [Status] = "RESOLVED" ) )
Create a line chart with calendar date and two measures, then add a trend line and turn off combine series option.
Regards,
Xiaoxin Sheng
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
10-24-2024 09:13 AM | |||
08-22-2024 12:04 PM | |||
11-03-2023 07:52 AM | |||
04-26-2024 05:53 AM | |||
09-25-2024 11:36 AM |
User | Count |
---|---|
127 | |
99 | |
82 | |
51 | |
46 |