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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
delmayhan
Frequent Visitor

Countrows on a measure

Hi All, 

i have a simple table with 2 columns

delmayhan_0-1652865039420.png

 

i created a measure and used countrows 

delmayhan_1-1652865086479.png

 

What i wanted to do next is to countrow on the created measure Countrows on how many times the Countrows occured as seen as below.

 

delmayhan_2-1652865161607.png

 How can i create a new measure/column on the countrows measure that i already have created.

 

Greetings

 

3 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@delmayhan , You need Bucket/Segment code
measure
Measure = Countrows(Table)

 

new Table
bucket = Generateseries(1,100,1)

 

 

new Measure
Countx(filter(Summarize(Table, Table[Column1], Table[Column2], "-1", [Measure]), [_1] = max(bucket[Value])), [User])

 

Dynamic segmentation -Measure to Dimension conversion: https://youtu.be/gzY40NWJpWQ

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

Anonymous
Not applicable

Hi @delmayhan ,

 

Almost the same as @amitchandak 's method.

1. A measure to get the count of each Column1 and Column2

Countrows = COUNTROWS('Table') 

2. A new table with number from 1-5:

NewTable = GENERATESERIES(1,5,1) 

3. Calculate the frequency:

Occured = 
var _t= SUMMARIZE('Table','Table'[Column1],'Table'[Column2],"Flag",[Countrows])
return COUNTROWS(FILTER(_t,[Flag]=MAX('NewTable'[Countrows])))

Output:

Eyelyn9_0-1653370160651.png

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi Eyelyn,

 

This worked thanks!

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @delmayhan ,

 

Almost the same as @amitchandak 's method.

1. A measure to get the count of each Column1 and Column2

Countrows = COUNTROWS('Table') 

2. A new table with number from 1-5:

NewTable = GENERATESERIES(1,5,1) 

3. Calculate the frequency:

Occured = 
var _t= SUMMARIZE('Table','Table'[Column1],'Table'[Column2],"Flag",[Countrows])
return COUNTROWS(FILTER(_t,[Flag]=MAX('NewTable'[Countrows])))

Output:

Eyelyn9_0-1653370160651.png

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Eyelyn,

 

This worked thanks!

amitchandak
Super User
Super User

@delmayhan , You need Bucket/Segment code
measure
Measure = Countrows(Table)

 

new Table
bucket = Generateseries(1,100,1)

 

 

new Measure
Countx(filter(Summarize(Table, Table[Column1], Table[Column2], "-1", [Measure]), [_1] = max(bucket[Value])), [User])

 

Dynamic segmentation -Measure to Dimension conversion: https://youtu.be/gzY40NWJpWQ

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi Amith,

 

it didnt work. I created a new Table and did this bucket = Generateseries(1,100,1)

 

After that i tried to create a new measure but it didnt work. 

 

delmayhan_0-1652867257667.png

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors