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
DazzaRCIB
Regular Visitor

Excel Calculation in Power bi

Morning,

 

I'm trying to recreate a calulation from excel into Power bi but with no luck so far:

DazzaRCIB_0-1714636133203.pngDazzaRCIB_1-1714636148796.png

On a calulated column I want to count how many times a number occurs? Any help would be great.

2 ACCEPTED SOLUTIONS
Chakravarthy
Resolver II
Resolver II

Hi @DazzaRCIB 

Please try giving the below code

COUNTIF =
COUNTROWS(
    FILTER(Table,Table[Column]=EARLIER(Table[Column]))
)

View solution in original post

Anonymous
Not applicable

Hi @Chakravarthy ,thanks for the quick reply, I'll add further.

Hi @DazzaRCIB ,

The Table data is shown below:

vzhouwenmsft_0-1714717981753.png

Use the following DAX expression to create a measure

 

Count = COUNTROWS('Table')

 

vzhouwenmsft_1-1714718091238.png

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Chakravarthy ,thanks for the quick reply, I'll add further.

Hi @DazzaRCIB ,

The Table data is shown below:

vzhouwenmsft_0-1714717981753.png

Use the following DAX expression to create a measure

 

Count = COUNTROWS('Table')

 

vzhouwenmsft_1-1714718091238.png

 

Chakravarthy
Resolver II
Resolver II

Hi @DazzaRCIB 

Please try giving the below code

COUNTIF =
COUNTROWS(
    FILTER(Table,Table[Column]=EARLIER(Table[Column]))
)

This would work as a column but I need it as a measure?

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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