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.
Hi,
I am trying to create a bar chart, where i want to compare Company (lets say company name - ABC) with its Peer group (this is any selction of companies from the slicer).
I want to have two slicers one for the selection of company name and another slicer for the selection of group of companies, both slicers are from same column.
Is there a way that I can show both the company name and Peer group (based on the slicer selection) on the bar chart on X axis.
The result that i want to acheive is the below image, where the peer group is a selection of group of companies
Thanks for your kind help.
Solved! Go to Solution.
Hi @anwarbi ,
I created a sample pbix file(see the attachment), it include two methods in it.
Method 1: Only create one slicer
Method 2: Create two dimension tables with [Name] field and two slicers
Company1 = VALUES('Table'[Name])
Company2 = VALUES('Table'[Name])
Measure1 =
AVERAGEX (
FILTER ( 'Table', 'Table'[Name] = SELECTEDVALUE ( 'Company1'[Name] ) ),
'Table'[Rating]
)
Measure2 =
AVERAGEX (
FILTER ( 'Table', 'Table'[Name] = SELECTEDVALUE ( 'Company2'[Name] ) ),
'Table'[Rating]
)
Best Regards
Hi @anwarbi ,
I created a sample pbix file(see the attachment), it include two methods in it.
Method 1: Only create one slicer
Method 2: Create two dimension tables with [Name] field and two slicers
Company1 = VALUES('Table'[Name])
Company2 = VALUES('Table'[Name])
Measure1 =
AVERAGEX (
FILTER ( 'Table', 'Table'[Name] = SELECTEDVALUE ( 'Company1'[Name] ) ),
'Table'[Rating]
)
Measure2 =
AVERAGEX (
FILTER ( 'Table', 'Table'[Name] = SELECTEDVALUE ( 'Company2'[Name] ) ),
'Table'[Rating]
)
Best Regards
Hi,
I have got another query related to this.
When I am applying the below measure to calculate average, the measure is giving me correct results
Hi,
Thanks a lot!
The second method solves the problem, although I needed to use Allselected value instead of Selectedvalue for the filter.
Thanks.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
100 | |
88 | |
69 | |
61 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |