Forum Discussion
mbowler
Helper I
2 years agoAdding 2nd line to line chart based on same table (but different filter context)
Hi, I have a requirement to add a (selectable) comparison line to an event sales timeline chart below: The page this visual is on has a drop-down slicer that chooses the main event (as shown ...
- 2 years ago
mbowler check these videos on my channel and tweak the solution as per your needs.
Compare selected customer sales with other customers - various methods (Part 1) (youtube.com)
Compare selected client sales with other TOP N clients - Part 2 (youtube.com)
parry2k
Super User
2 years agombowler check these videos on my channel and tweak the solution as per your needs.
Compare selected customer sales with other customers - various methods (Part 1) (youtube.com)
Compare selected client sales with other TOP N clients - Part 2 (youtube.com)
- mbowler2 years ago
Helper I
Fantastic parry2k, just what I needed! This community is great.
Just to help those who might read this later, here's what I did to solve my problem:
- Created a new (disconnected) table with just the list of the Event names: CompEventsList = VALUES(AllPerformances[EventName])
- This allowed me to have a second slicer on the same page with the same set of Event names but completely independent of the slicer that is controlling the rest of the visuals on the page.
- Created a new measure that uses the same measure as in the line chart for the main event but changing the conext to the second table using TREATAS:
- Comparison Event Running Total = CALCULATE( [Main Event Running Total], TREATAS( VALUES( CompEventsList[EventName] ), AllPerformances[EventName] ))
- Add the measure above to my line chart
- Created a new (disconnected) table with just the list of the Event names: CompEventsList = VALUES(AllPerformances[EventName])