gpt-3.5-turbo-0613· OpenAI
WildChat-4.8M (AI2)
I have a table with columns A, B, C, D. How to count the number of rows for unique…
- User
I have a table with columns A, B, C, D. How to count the number of rows for unique combination of B, C, D. Use DAX
- Assistant
To count the number of rows for unique combinations of columns B, C, and D in a Power BI table using DAX, you can use the following formula:
UniqueRowCount = COUNTROWS(DISTINCT(Table_Name[B] & Table_Name[C] & Table_Name[D]))Replace
Table_Namewith the actual name of your table. This formula concatenates the values in columns B, C, and D using the ampersand (&) operator, creating a unique identifier for each combination. TheDISTINCTfunction then returns only the distinct combinations, andCOUNTROWScounts the number of rows in the result.After creating the measure, you can use it in a visual to display the count of unique rows for the combination of B, C, and D.