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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
anwarbi
Helper III
Helper III

Calculating Distinctcount of Filtered Value

Hi,

 

I am new to power bi, and I am trying to calculate Distinctcount of Values based on a measure which I have created using Summarise function.

 

So Firstly, I have created the below measure to calculate the Max value.

 

Group High = VAR AVG_SCORE =
                SUMMARIZE(FILTER(Raw_data,
                    Raw_data[Company] in ALLSELECTED('Group'[Company])),
                    Raw_data[Company],Raw_data[Product],
                    "high_score_product_rate",
                  CALCULATE(AVERAGE(Raw_data[Rate]))
                RETURN MAXX(AVG_SCORE,[high_score_product_rate]
)
 
Now, based on the above measure, I want to calculate distinctcount of employees corresponding to the value of Group High score that i get from the above measure.
for e.g. lets say Company ABC has the highest score based on the above measure so then I want to know how many employees are there in company ABC.
 
Any quick help is appreciated. 
 
Thanks
1 REPLY 1
v-yanjiang-msft
Community Support
Community Support

Hi @anwarbi ,

From your description, I still can't figure out the framework of the sample. You want to know how many employees are there in company, but employee isn't refered in the code, what's the relationship between employee and the measure, could you please explain more, it's better to have a sample.

 

Best regards,

Community Support Team_yanjiang

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Solution Authors