Forum Discussion
Line chart visual with two lines based on two slicers
Hello!
(I am quite new to Power BI)
I need to create a line chart to compare the revenue of customers. I've divided the report page in two areas, each for a customer. So on the left I have a slicers for customer 1 and on the right for customer 2. I want to combine these selections in one line chart with 2 lines. 1 line for each selected customer.
Is there anyone that maybe has an solution for this?
thank you!
Hi,
Please see this tutorial...
If I understood you correctly,
this is exactly your scenario:https://www.youtube.com/watch?v=O0VsTLDTjss
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
11 Replies
- pratyashasamalMemorable Member
Hi Bnjmnrod ,
In each line measure you have to check if that value is selected or not
example
ABC new = If("ABC" in allselected(Slicer[Slicer]) , [ABC], blank())
DEF new = If("DEF " in allselected(Slicer[Slicer]) , [DEF ], blank())
Thanks ,
Pratyasha Samal
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C - Ritaf1983Super User
Hi Bnjmnrod
The desired result could be achieved in one graph by:
Time points on the X axis
Revenue on the Y
A customer name on the legendAs you can see in the attached pic
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
- BnjmnrodRegular Visitor
Hi,
the customer list is very large so this is showing a lot of lines in the graph.. I also want to have the slicer (that is also affecting other visuals) to insert a line in the chart
- Ritaf1983Super User
Hi,
It's ok you will see only the customers you have selected on the slicerand slicer affects all visuals on the page