Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
a4
Helper III
Helper III

How represent separate lines for each Broker in line chart in Power Bi

Hi,

I have a column(Broker) and a measure(Strike Rate) in my model.

All I want is to display separate Strike Rate lines for each Broker whenever the Brokers are selected from the slicer.

Slicer is multiselect.

Please find below screenshot for better understanding.

 

 

 

 

line.PNG

 

As you can see there is only one Strike Rate line for all Brokers but I need separate lines from each Broker selected in above slicer.

 

 

 

 

 

 

Kind Regards

Amit Kumar

1 ACCEPTED SOLUTION

Hi, @a4 

 

You need to create a category table with a single column,use it as slicer, and then create a measure.

Like this:

Category = DISTINCT('Table'[Category])

Measure = 
IF(
    ISFILTERED('Category'[Category]),
    IF(
        SELECTEDVALUE('Table'[Category]) in DISTINCT(Category[Category]),
        SUM('Table'[VAlue])
    )
)
//[strike rate] in your formula should be a measure,so change 'SUM('Table'[VAlue])' to [strike rate]

4.png

Here is my sample .pbix file.Hope it helps.

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-janeyg-msft
Community Support
Community Support

Hi, @a4 

 

It’s my pleasure to answer for you.

According to your description,It should be no problem to put the legend directly, If there is a problem, it may be related to the formula used in the measure.

Could you mind providing us with some sample data or the formula of the measure,so we can help you soon.

 

Best Regards

Janey Guo

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-janeyg-msft 
Please find below the measure.

 

Dynamic Strike Rate = IF(ISFILTERED(quotedetails[Broker]),[Strike Rate],BLANK())

All I want is that whenever multiples values(Brokers) are selected from slicer then there should separate lines(Strike Rate) for each Broker and if nothing is selected then there should be no lines.
 
Kind Regards
Amit Kumar

Hi, @a4 

 

You need to create a category table with a single column,use it as slicer, and then create a measure.

Like this:

Category = DISTINCT('Table'[Category])

Measure = 
IF(
    ISFILTERED('Category'[Category]),
    IF(
        SELECTEDVALUE('Table'[Category]) in DISTINCT(Category[Category]),
        SUM('Table'[VAlue])
    )
)
//[strike rate] in your formula should be a measure,so change 'SUM('Table'[VAlue])' to [strike rate]

4.png

Here is my sample .pbix file.Hope it helps.

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@a4 , if you are looking for that vertical like I doubt that. Otherwise you can add broker as legend and try.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi Amit,

All I want is separate lines of Strike Rate for each Broker Selected in above slicer.

I tried the legend option but it doesn't suits my requirement.

 

Kind Regards

Amit Kumar

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.