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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
OdiAssli
Frequent Visitor

How to count number of rows with specific column value?

Hi, 

 

I have the below table and I would like to add new column (custom column?) that will count number of "Names" that have the same "Age" value. then I will display the data into table in report

 

NameAge
Odi27
Sofian27
Ludmila29
Yousef30
Eilon30

 

Thanks

1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

Hi @OdiAssli 

CALCULATE (case insensitive) is a BASE power BI statement. I don't know any statement that would be more power BI than CALCULATE 🙂

Снимок.PNG


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

6 REPLIES 6
Syndicate_Admin
Administrator
Administrator

Hello Good morning,

I'm trying to make a report and I want to know how I can take the following example in pbi

example:

I have a date of 1000 tickets per month and I want to take out how many have been met per month and it looks like the picture in pbi

angiem_96_0-1619476156836.png

I appreciate your help.

Syndicate_Admin
Administrator
Administrator

Good morning, I don't allow myself to make a column with those formulas, unless I made a measure, but if I need the column as I could?

az38
Community Champion
Community Champion

Hi @OdiAssli 

try

Column = calculate(DISTINCTCOUNT('Table'[Name]), ALLEXCEPT('Table', 'Table'[Age]))

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
OdiAssli
Frequent Visitor

Hi @az38 ,

Is it Power BI formula? I got this error:

Expression.Error: The name 'calculate' wasn't recognized. Make sure it's spelled correctly.

az38
Community Champion
Community Champion

Hi @OdiAssli 

CALCULATE (case insensitive) is a BASE power BI statement. I don't know any statement that would be more power BI than CALCULATE 🙂

Снимок.PNG


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
OdiAssli
Frequent Visitor

Works good, Thank you @az38  😀

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.