The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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 @AP23
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 @AP23
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
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
114 | |
79 | |
78 | |
47 | |
39 |
User | Count |
---|---|
147 | |
115 | |
65 | |
64 | |
53 |