Forum Discussion
RafalMonka
4 years agoHelper I
Line chart with Legend and additional measure
Hi, we have a dashboard with standard Line chart where Axis are months, Legend is UserAssigned and Values – some measure Score. What we need to do is to place additional measure which w...
- 4 years ago
AlexisOlson
4 years agoSuper User
parry2k's suggestion should work. Create a new table to use for the legend
Legend = UNION ( VALUES ( Table1[User] ), { "Average" } )
Then define a measure to use in the line chart. (Edited to include KEEPFILTERS.)
ChartValue =
IF (
SELECTEDVALUE ( Legend[User] ) = "Average",
AVERAGEX ( VALUES ( Table1[User] ), CALCULATE ( SUM ( Table1[Value] ) ) ),
CALCULATE (
SUM ( Table1[Value] ),
KEEPFILTERS ( TREATAS ( VALUES ( Legend[User] ), Table1[User] ) )
)
)
Result:
See attached .pbix.
You may want to vote for this Idea:
Line Chart with multiple values fields and legends