Forum Discussion
ahmedabdelsaboo
9 years agoNew Member
Counting unique data based on twi columns
I am working with 2 columns in Power Bi. First column is (unique ID) Column and the other is (disposition ) column. The disposition column has 3 categories ( Sold, In warehouse, or In transit ) My ...
v-yulgu-msft
9 years agoMicrosoft Employee
Hi ahmedabdelsaboo,
Suppose your table structure looks like:
You could create a calculated column using below formula:
Total Sales = CALCULATE ( DISTINCTCOUNT ( 'Product Table'[ID] ), ALLEXCEPT ( 'Product Table', 'Product Table'[disposition] ) )
Or, you can create a measure using this formula:
Total Sales measure = DISTINCTCOUNT('Product Table'[ID])
Use a table visual to display data, both above methods can return this result:
Alternatively, you can directly use a matrix to show above results.
Best regards,
Yuliana Gu
ahmedabdelsaboo
9 years agoNew Member
v-yulgu-msft Thanks a lot for your help