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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.