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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
utkarshaggarwal
New Member

Client vs Peer Comparison

Hi,

 

I am new to Power BI and have the following use case with me:

 

  • I have 2 data sources (in Excel)
    • Source A has the data for a client for n number of criteria (Industry, Employees count, Revenue, etc.) in columns.
    • Source B has the peer data (100+ rows) for the same criteria, 1 peer per row.

I want to combine the 2 data sources in the following way:

 

  • If I create a bar chart for any criteria (eg. Average Revenue) then I should be able to compare the client with the peer in the same chart.
  • I should be able to apply filters on the peer's data in such a way that the Client's bar doesn't change and only the Peer's bar changes if I use a slicer in the dashboard.

 

Hope the use-case makes sense.  Highly appreciate any help on this.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@utkarshaggarwal , Create a common dimension, which has the client name from A and Peer name from B

called peer group, If need add a new column as client name in source A

 

distinct(union(distinct(source[Client_name]), distinct(source[peer_name])))

 

Now using this you can analyze them together

 

if you want to select peer using a slicer, then you might need independent tables.

refer date example

How to use two Date/Period slicers :https://www.youtube.com/watch?v=WSeZr_-MiTg

View solution in original post

3 REPLIES 3
v-xulin-mstf
Community Support
Community Support

Hi @utkarshaggarwal

 

Is your issue solved?

If the issue has been solved, please adopt the solution to help others.

If you still have some question, please don't hesitate to let me known.‌‌

😉

 

Best Regards,

Link

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!

v-xulin-mstf
Community Support
Community Support

Hi @utkarshaggarwal

 

The two tables need to have common columns and create relationships that can then achieve your expected output as:

vxulinmstf_0-1624008589883.png

vxulinmstf_1-1624008604500.png

 

If you still have some question, please don't hesitate to let me known.‌‌

 

Best Regards,

Link

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!

 

amitchandak
Super User
Super User

@utkarshaggarwal , Create a common dimension, which has the client name from A and Peer name from B

called peer group, If need add a new column as client name in source A

 

distinct(union(distinct(source[Client_name]), distinct(source[peer_name])))

 

Now using this you can analyze them together

 

if you want to select peer using a slicer, then you might need independent tables.

refer date example

How to use two Date/Period slicers :https://www.youtube.com/watch?v=WSeZr_-MiTg

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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