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.
Hi,
Hope someone can help with the following please:
I have the below TableA:
Person_ID | SessionCategory |
11 | Short Day |
22 | Full Day |
11 | Full Day |
33 | AM |
I want to add a column to this table which shows the number of rows which contain the same Person_ID, such as the below:
Person_ID | SessionCategory | RepeatedID |
11 | Short Day | 2 |
22 | Full Day | 1 |
11 | Full Day | 2 |
33 | AM | 1 |
I don't want to remove any rows at this stage, as I need to use the above to create two other tables filtered on a) Person_IDs showing just once, and b) Person_IDs that show 2 or more times.
Please can you advise how I can achieve this?
I have tried the following but I am receiving an error stating "The function COUNTX cannot work with values of type Boolean". (I have the column set to Data Type "Whole number".)
Many thanks.
Solved! Go to Solution.
Hi @Anonymous
Please add a calculated column with the dax formula =
the pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Thanks @Ritaf1983 this works
Proud to be a Super User! |
|
@bhanu_gautam
Glad to help 🙂
Hi @Anonymous
Please add a calculated column with the dax formula =
the pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
User | Count |
---|---|
116 | |
73 | |
60 | |
48 | |
48 |
User | Count |
---|---|
171 | |
122 | |
60 | |
59 | |
56 |