Forum Discussion
Difference between markers / points / goalposts ?
- Anonymous1 year ago
Hi DS1234 ,
I created a sample pbix file(see the attachment), please check if that is what you want.
1. Remove the relationship between two dimension table and fact table
2. Add secondary y-axis
3. Add two X-Axis Constant Lines
Best Regards
Hi DS1234 -you can use measures and a dynamic slicer setup to calculate the differences in X (time) and Y (value) based on two selected markers (start and end points).
Use these measures to calculate the values of the selected marker (Y-axis)
StartDiskSpace =
CALCULATE(
MAX('DiskData'[DiskSpace]),
'DiskData'[Date] = SELECTEDVALUE('StartDate'[StartDate])
)
EndDiskSpace =
CALCULATE(
MAX('DiskData'[DiskSpace]),
'DiskData'[Date] = SELECTEDVALUE('EndDate'[EndDate])
)
Create measures to calculate the differences in time (X-axis) and value (Y-axis)
ChangeInDiskSpace = [EndDiskSpace] - [StartDiskSpace]
ChangeInDays =
DATEDIFF(
SELECTEDVALUE('StartDate'[StartDate]),
SELECTEDVALUE('EndDate'[EndDate]),
DAY
)
GrowthRate =
DIVIDE([ChangeInDiskSpace], [ChangeInDays], 0) // Growth rate in MB/day
Add vertical lines to your chart for the selected dates. You can use a Line and Stacked Column Chart visual with measures like this
MarkerLine =
IF(
'DiskData'[Date] = SELECTEDVALUE('StartDate'[StartDate]) ||
'DiskData'[Date] = SELECTEDVALUE('EndDate'[EndDate]),
MAX('DiskData'[DiskSpace]),
BLANK()
)
Add this measure as a line series to your chart to highlight the markers.
Hope the above calculations helps to derive the same.
Hi,
Thank you and I really appreciate the response! However, I don't quite understand fully.
I am not so clear on the "Dynamic Slicer" idea here. But what I could find, I ended up doing the following:
1 ) Create a StartDate table defined as: