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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Kish1999
Helper II
Helper II

Find score for a department in a program

Hello All,

we have a requirement where we need to find the Count of department in a program where the Minimum of the score is "3".

So, suppose if have a program in which there are two departments and there are three entries(scores) in the department. We need to find out if the Minimum score for that department is 3 or not, and if the min score is 3 then count that program.

Can you please help us write this measure.

sample dataset:

ProgramDepartmentScore
   
101a4
101a3
101a3
101b3
101b3
102a2
102a3
102b5
102b3
102b3
103a2
103a3
103b1
103b2

Result:

ProgramCount
1012
1021
1030
1 REPLY 1
OguzMavice
Resolver II
Resolver II

Hi @Kish1999 ,  in order to reach this result we should filter values which are equal to 3 as min score and count all of them concerning department. And we will do all process in measure. 

 

Could you please try below dax code ;

 

Count_Calc =
CALCULATE(
    COUNTROWS(
        FILTER(
            VALUES('program'[departments]),
            CALCULATE(MIN('program'[score])) = 3
        )
    )
)
result will be like that ; 
 
OguzMavice_0-1699993317144.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.