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

v-zhouwen-msft
Community Support
Community Support

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
v-zhouwen-msft
Community Support
Community Support

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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