Skip to main content

How do I calculate the unique combinations of two columns in Power BI?

Table of Contents

Or

How to get distinctcount to two columns?

Power BI enables you to calculate distinct combinations of two columns by using the DAX SUMMARIZE function in a calculation or by concatenating the two columns into a calculated column and then applying the DISTINCTCOUNT function in a measure.

Distinct count= countrows(summarize(Sales, 'Item'[Brand],Geography[State]))

Add comment