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
AndrewPaul
Regular Visitor

Client vs Peers metrics using measures

Hi

 

I am very new to using DAX and have been working on one large table with data (Table: "Data") which includes a column with company names (Column: "Peers") and a column with their respective headcount numbers (Column: "INC_CNT_JOB").

 

Step 1 is to summarise the total headcount (sum total) for one specific company versus a selection of peers.

 

The approach I have taken (although probably not the most elegant) is to make a hardcopy of the Peers column and labelled itas "Client" in the PBI Editor. On my dashboard, I have two Slicers: One linked to Client (single selector) and the other linked to the Peers (multiple selector) column.

 

I created two measures: ClientCount and PeerCount calculate the sum totals for each aspect:

 

ClientCount = CALCULATE(SUM(Data[INC_CNT_JOB]),ALLEXCEPT(Data,Data[Client]))

PeerCount = CALCULATE(SUM(Data[INC_CNT_JOB]),ALLEXCEPT(Data,Data[Peers]))

 

I have switched off the Edit Interactions between the two slicers and the table with these measures.

 

I find that only one of the two measure sum correctly if I adjust the Edit Interactions and therefore cannot get a summary of the both Client and Peers in the table. 

 

Hope I have explained this well. Thanks for your help in advance!

 

-Andy

2 REPLIES 2
CheenuSing
Community Champion
Community Champion

Hi @AndrewPaul

 

Please share data and the output expected on OneDrive and provide the link

 

Cheers

 

CheenuSing

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!

Thanks @CheenuSi. I managed to get it working.

 

I took a copy of the data set and used a common table with a many to one connections.

 

Thanks!

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.

Top Solution Authors