Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Dear all,
I am seeking for a solution to get a unique count for the following situation:
I have a customer table with main customer number and a an additional customer delivery number:
Main customer number | Delivery customer number |
111 | 123 |
111 | 134 |
111 | 145 |
222 | 234 |
222 | 245 |
333 | 345 |
The final result should be a measure showing for the following main customer number the following output:
111 ---> unique count of 3 delivery customer numbers
222 ---> unique count of 2 delivery customer numbers
333---> unique count of 1 delivery customer number
Any suggestion is welcome how to fix it.
Thanks!
Solved! Go to Solution.
Hi @Power_BI_Adapt ,
I think you can use simply the measure COUNTROWS('Table') and put it in matrix with the Main Customer Number column in the row.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Like in this example
Thanks, but it still returns the total number of all rows back to each main customer number. Maybe I do something wrong.
You need to create a measure, not a colum
Herewith a screenshot:
'Hoofd klantnummer' = Main customer number and 'Aantal afleverklantnummers' = Number delivery customer numbers'.
'Hoofd klantnummer' is soueced from table 'Dim Klant' en 'Aantal afleverklantnummers' is a measure written in the following way:
Hi @Power_BI_Adapt ,
do you have a 1 to many relationship between Dim Klant and Dim Afleverklant?
if you send me a sample file with no sensitive data I can try to give you further help
Herewith a link to the two tables Customer and Delivery customer
In my file the measure is working. If you want I can send you my file
Thanks. If you could send your file, I will appreciate.
@mangaus1111: yes, true, a one to many relationship (Dim Klant (1) to Dim Afleverklant (many).
Hi @Power_BI_Adapt ,
I think you can use simply the measure COUNTROWS('Table') and put it in matrix with the Main Customer Number column in the row.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
It works!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
97 | |
79 | |
66 | |
62 |
User | Count |
---|---|
145 | |
113 | |
105 | |
85 | |
65 |