Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Krishna_R
New Member

Count of Row Combinations

Hi All,

 

I'm trying to get the count of each row combination as shown below

Krishna_R_1-1675166009025.png

I've added the measure & added the following DAX:

Count = CALCULATE (COUNTROWS (dbo),ALLEXCEPT (dbo, dbo[C1], dbo[C2],dbo[C3],dbo[C4],dbo[C5]))

When, I tried applied the filters the total count is giving the wrong as shown below:

Krishna_R_2-1675166430835.png

 

I was expecting to see 9 where as power bi showing a different count. am i missing something here ?

 

2 REPLIES 2
Krishna_R
New Member

Hi @Thejeswar 

Thanks for the response, I tried the same approach. But somehow it still giving me the wrong count

Thejeswar
Super User
Super User

@Krishna_R 

Hi  ,I was able to achieve this by a different method. Instead of a measure, I am using a column.

 

1. Create a Column to concatenate all the five columns into one

concat = CONCATENATE('Table'[C1], CONCATENATE('Table'[C2], CONCATENATE('Table'[C3], CONCATENATE('Table'[C4], 'Table'[C5]))))
 
2. Create a column to count the number of rows
Count1 = COUNTROWS(FILTER('Table', 'Table'[concat] = EARLIER('Table'[concat])))
 

Output looked like below 

 

Thejeswar_0-1675168840185.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.