Forum Discussion
Creating Trends Over time
Hi powellar ,
Here are some steps you can try
Sample data
Table 1
| Date | Poam |
| 8/21/2024 | Poam1 |
| 8/21/2024 | Poam2 |
| 8/28/2024 | Poam3 |
| 8/28/2024 | Poam4 |
| 8/28/2024 | Poam5 |
| 9/4/2024 | Poam6 |
| 9/4/2024 | Poam7 |
| 9/4/2024 | Poam8 |
| 9/4/2024 | Poam9 |
| 9/11/2024 | Poam10 |
| 9/11/2024 | Poam11 |
Table2
| Date | Poam |
| 8/21/2024 | Poam1 |
| 8/21/2024 | Poam2 |
| 8/21/2024 | Poam3 |
| 8/28/2024 | Poam4 |
| 8/28/2024 | Poam5 |
| 8/28/2024 | Poam6 |
| 9/4/2024 | Poam7 |
| 9/4/2024 | Poam8 |
| 9/11/2024 | Poam9 |
| 9/11/2024 | Poam10 |
| 9/11/2024 | Poam11 |
Create measures
Difference =
VAR _count =
CALCULATE(
COUNT('Table 1'[Date]),
ALLEXCEPT(
'Table 1',
'Table 1'[Date]
)
)
VAR PreviousCount =
CALCULATE(
COUNT('Table 1'[Date]),
ALLEXCEPT(
'Table 1',
'Table 1'[Date]
),
DATEADD('Table 1'[Date], -7, DAY)
)
RETURN
IF(
ISBLANK(PreviousCount),
_count,
_count - PreviousCount
)NextDifference =
VAR NextDifference =
CALCULATE(
[Difference],
ALLEXCEPT(
'Table 1',
'Table 1'[Date]
),
DATEADD('Table 1'[Date], +7, DAY)
)
RETURN
IF(
NextDifference = BLANK(),
0,
NextDifference
)IsBreakingPoint =
IF(
[NextDifference] <= 0 && [Difference] >=0 || [NextDifference] >= 0 && [Difference] <=0 ||
SELECTEDVALUE('Table 1'[Date]) =
CALCULATE(
MAX('Table 1'[Date]),
ALL('Table 1'[Date])
) ||
SELECTEDVALUE('Table 1'[Date]) =
CALCULATE(
MIN('Table 1'[Date]),
ALL('Table 1'[Date])
),
"Black",
"White"
)
The above MEASURE is to determine if the point is a turning point or both ends of the end point
Enable datalables and apply the measure to value color
Final output
In order for multiple tables to be realized on the same line chart, you need to create relationships between the tables
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- powellar2 years agoRegular Visitor
Maybe? I can test out that code, but this doesn't appear to be using any of the sample data provided. I am more looking for trends of total poams opened, total poams closed, total poams delayed, over time. So a line chart showing on 1/1 1 poam was opened, on 3/1, now two poams are opened (the one from 1/1 and the one from 3/1), on 6/1 3 poams were opened. so the line trend should go from 1 to 2 then to 3, with dates of 1/1, 3/1, 6/1. Does that make sense?
- lbendlin2 years ago
Super User
Put your data in a ribbon chart. See if that works.