Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Distinct Count, Filter

I would like to know how many peple have less than 25 hours.    I have a measure that calculates Hours= CALCULATE(ROUND(SUM(Utilisation[NonChargeableHours]),4), Matter[Nonbill Category]="Pro Bono")...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

    gmsamborn  offers a good solution. In the meantime I have another approach to your problem that I hope will help you. Based on the information you provided, you are actually on the right path. I have modified your code slightly:

    Below 25 hours = 
    CALCULATE (
        DISTINCTCOUNT ( 'Table'[Name] ),
        FILTER ( 'Table', 'Table'[Hours] < 25 )
    )
    

    Final output:

     

    How to Get Your Question Answered Quickly - Microsoft Fabric Community

    If it does not help, please provide more details with your desired out put and pbix file without privacy information.

     

    Best Regards,

    Ada Wang

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

  • Ashish_Mathur's avatar
    2 years ago

    Hi,

    Revise the second measure to

    Measure = countrows(FILTER(VALUES(WFE[Fee Earner Name]),[Hours]<25))