Forum Discussion
Trend line chart
Hi All,
My table looks like below.
| Month | Count |
| September | 10 |
| October | 5 |
My target per month is 15
| September | 15 |
| October | 30 |
| November | 45 |
| December | 60 |
| January | 75 |
| Februrary | 90 |
| March | 105 |
| April | 120 |
| May | 135 |
| June | 150 |
| July | 165 |
| August | 180 |
End table should be like this. and when i put this Trend line it should show like below
| Month | Target | Actuals - Cummulative |
| September | 15 | 10 |
| October | 30 | 15 |
| November | 45 | |
| December | 60 | |
| January | 75 | |
| Februrary | 90 | |
| March | 105 | |
| April | 120 | |
| May | 135 | |
| June | 150 | |
| July | 165 | |
| August | 180 |
- Anonymous4 years ago
Hi Anonymous ,
Please update the formula of your measure as below and check whether it can get your expected result.
Measure = CALCULATE ( COUNT ( 'p1'[Name] ), FILTER ( ALLSELECTED ( 'p1' ), 'p1'[Fiscal Month] <= SELECTEDVALUE ( 'p1'[Fiscal Month] ) ) )By the way, what's the data type of field [Fiscal Month]? It is Numeric or Text type? If it is Text type, the above measure will not return the correct result...
Best Regards
3 Replies
- amitchandakSuper User
Anonymous , You need to have a common month /date table. Create a date from the month and then join that with date table on the axis.
for the first table, you need cumulative measures. Second one you can use as is
Cumm = CALCULATE(SUM('Table'[Count]),filter(allselected(date),date[date] <=max(date[Date])))
- AnonymousNot applicableI have tried calculating cumulative with this query
CALCULATE (COUNT('p1'[Name]),FILTER (ALLSELECTED ('p1'[Fiscal Month]),'p1'[Fiscal Month] <= MAX ('p1'[Fiscal Month])))but I'm getting below outputMonth Cumm September 10 October 5 - AnonymousNot applicable
Hi Anonymous ,
Please update the formula of your measure as below and check whether it can get your expected result.
Measure = CALCULATE ( COUNT ( 'p1'[Name] ), FILTER ( ALLSELECTED ( 'p1' ), 'p1'[Fiscal Month] <= SELECTEDVALUE ( 'p1'[Fiscal Month] ) ) )By the way, what's the data type of field [Fiscal Month]? It is Numeric or Text type? If it is Text type, the above measure will not return the correct result...
Best Regards