Forum Discussion

Cx2's avatar
Cx2
New Member
1 year ago
Solved

Distinct count from previous month

Hey all,   Pretty new to PowerBI which has been implemented in my work - and have my first issue that I can't seem to resolve via ChatGPT!   Essentially I have a dataset of employees which have a...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Cx2 ,

     

    Please share sample data as well as your expected results, but you can try the following expression in general:

    DistinctCountPerMonth = DISTINCTCOUNT('YourTable'[EmployeeID])
    DistinctCountLastYear = 
    CALCULATE(
        DISTINCTCOUNT('YourTable'[EmployeeID]),
        SAMEPERIODLASTYEAR('YourTable'[Date])
    )
    TotalDistinctCount = 
    [DistinctCountPerMonth] + [DistinctCountLastYear]

     

    Hope it helps!

     

    Best regards,
    Community Support Team_ Scott Chang

     

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