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.
Hello all,
I have two tables: Sales and Store tables. Both have multiple columns and they are related by the "StoreID" column.
Below you can see a sample of that.
Sales Table
Store Table
I want to create a new column in the Store table with the number of products by store, based on Sales table. The "ProductID" column can have nulls and duplicate values, so I think the most suitable count is distinctcount.
This is what I want:
Can anyone help me writing the right formula?
Thanks in advance.
Solved! Go to Solution.
Given the relationship, I think you can just write
Product_count = CALCULATE ( DISTINCTCOUNT ( Sales[ProductID ) )
Given the relationship, I think you can just write
Product_count = CALCULATE ( DISTINCTCOUNT ( Sales[ProductID ) )
Hello @AlexisOlson ,
Thank you for your help! It works.
I had selected a wrong table with a similar name and that's why it was not working.
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 |
---|---|
49 | |
25 | |
20 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
18 | |
18 |