Forum Discussion
RafalMonka
Helper I
4 years agoLine 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
parry2k
Super User
4 years agoRafalMonka I see, change the measure to this:
ChartValue =
VAR __users = INTERSECT ( VALUES ( Legend[User] ), VALUES ( Table1[User] ) )
RETURN
IF (
SELECTEDVALUE ( Legend[User] ) = "Average",
AVERAGEX ( VALUES ( Table1[User] ), CALCULATE ( SUM ( Table1[Value] ) ) ),
CALCULATE (
SUM ( Table1[Value] ),
TREATAS ( __users, Table1[User] )
// TREATAS ( VALUES ( Legend[User] ), Table1[User] )
)
)
✨ Follow us on LinkedIn and subscribe to our YouTube channel
Learn about conditional formatting at Microsoft Reactor
My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡