Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Labor Utilization Calculation

I am new to DAX and need help with an equation that needs to count the number of occurrences when a date field shows "same date". Date EmployeID CategoryID   11/1/2022 1 1     11/1/2...
  • v-yueyunzh-msft's avatar
    3 years ago

    Hi , Anonymous 

    According to your description, you want to " count the number of Category ID entries within same date range". Right?

    But fo the "0.882353,0.843137,0.862745" , i can not kown how to calculate this value.

    My test data is the same as yours.

    Based on my understand , the "2022/11/1" for the count fo category is 2?

    If this , you can click "New Column":

    Column = var _rowdate =  [Date] 
    var _t =SELECTCOLUMNS( FILTER('Table','Table'[Date]=_rowdate) , "Category" , [CategoryID])
    return
    COUNTROWS( DISTINCT(_t))

    Then you can get the the number of Category ID entries within same date range.

    If this does not meet your needs, can you provide us with your expected output and your detailed calculation logic?

     

    Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

     

    Best Regards,

    Aniya Zhang

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