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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Koushikrish
Helper I
Helper I

DAX Count Based on 2 Name (Key) Columns

Hello,

 

I am working on a Kudos report for my team's dashboard. The dataset I have kind of looks like this with just the 3 columns. 

 

Koushikrish_0-1657755876169.png

 

(The Recepient is the person who was rewarded a kudos point while Nominator is the own who nominated that person.)

 

For the dashboard, I need a view like this based on each user:

 

Koushikrish_1-1657755977839.png

 

This is for us to know how many times a user who nominated another user had actually received a kudos point.

 

How can I create these 2 measures 'Times Received' and 'Times Nominated' effectively in DAX? This is basically just a Count but as the Recepient and Nominator are 2 seperate columns, do I need to create another calculated column per each row to identify the value of these 2 measures? Or can it be done via a calculated table or a simple measure? 

 

Would appreciate any help on this. Please let me know if you need more information!

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Koushikrish , You need to have a username table, if you do have to create one

 

username = distinct(union(distinct(Table1[Recepient]),distinct(Table2[Nominator])))

 

Join with both tables. One join will be inactive.

You just need a count/distintcount measure.

 

For inactive use userelationship to activate relation

 

Count(Table[ID]) //active join

 

Assume Nominator is inactive

 

calculate(Count(Table[ID])  ,userelationship (username[Recepient] , Table[Nominator]) )

 

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

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

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Koushikrish , You need to have a username table, if you do have to create one

 

username = distinct(union(distinct(Table1[Recepient]),distinct(Table2[Nominator])))

 

Join with both tables. One join will be inactive.

You just need a count/distintcount measure.

 

For inactive use userelationship to activate relation

 

Count(Table[ID]) //active join

 

Assume Nominator is inactive

 

calculate(Count(Table[ID])  ,userelationship (username[Recepient] , Table[Nominator]) )

 

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

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

@amitchandak : That worked as I expected. Also there was only one table and not multiple so I used the 2 different columns (Recipient and Nominator). Thanks for your help!!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.