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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
Resident Rockstar
Resident Rockstar

@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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.