Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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 all been given their own assigned ID (for distinct count reasons)
What I am trying to do is basically have the total distinct IDs of a month and add it together with the total of distinct IDs from 12 months prior, I.e. April 2024 total + April 2023 total.
I am able to get both of these totals separately in my "Totals" column however in a separate column which adds the current month and the month 12 months prior, it is just repeating the same total as the current month.
Any advice would be much appreciated and happy to provide details as best I can.
Solved! Go to Solution.
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.
Hi @Cx2
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
104 | |
69 | |
49 | |
41 | |
34 |
User | Count |
---|---|
164 | |
111 | |
61 | |
53 | |
38 |