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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Anonymous
Not applicable

Count rows with filter condition

I am trying to create a measure volumn based on this syntaxt but getting an error saying there is a cicurlar dependency

Count_A = calculate(COUNTA('mytable'[column1]),'mytable'[column1] =1.00). Does anyone know where i might be going wrong?
column1 has values between 1 and 5 and the requirement is to count how rows of 1, 2, 3, 4, 5
1 ACCEPTED SOLUTION

Please download my file from the last answer and compare what we did.
Please share your file if it still fails to work.
This is a link:
https://drive.google.com/file/d/1sggfULJW-Dr8sQ80VWUIkrglrBwXWvZy/view

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

 
Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

9 REPLIES 9
Ahmedx
Super User
Super User

write like this

Count_A = calculate(COUNTA('mytable'[column1]),
FILTER(ALL('mytable'),'mytable'[column1] =1.00))

 

Ritaf1983
Super User
Super User

Hi @Anonymous 
In terms of syntax, it is correct.
Attached is a picture of what I tried.
Regarding logic, I'm not sure I understand what you're trying to accomplish.
Could you please attach a sample of your data and the desired result?

Ritaf1983_0-1681046868606.png

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
Anonymous
Not applicable

jokimwele76_0-1681049627825.png

that's the column that i want to count how many 2.00, or 3.00 or 4.00 or a 5.00  

The picture is cropped and still difficult to understand something.
Please attach a table / link to your file, as well as a picture of the desired result.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
Anonymous
Not applicable

jokimwele76_0-1681052933402.png

this shows the expected results. basically i want the expected results to be dispalyed as  card visual showing a count for each.

 

Anonymous
Not applicable

jokimwele76_0-1681052933402.png

this shows the expected results. basically i want the expected results to be dispalyed as  card visual showing a count for each.

 

Additionally, your original formula works well for the cards. Please see the attached pictures:

Ritaf1983_0-1681053756492.pngRitaf1983_1-1681053790745.png

It is also possible to combine a basic formula without a filter with filtering the card itself:

test3 = COUNTA('Table'[value])
Ritaf1983_2-1681053986258.png

https://drive.google.com/file/d/1sggfULJW-Dr8sQ80VWUIkrglrBwXWvZy/view?usp=share_link

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

 


 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
Anonymous
Not applicable

My orginal formula kept giving an error (A circular dependency was detected: 'table1'[cloum1], 'table1'[Column1], 'table1'[column1].)

Please download my file from the last answer and compare what we did.
Please share your file if it still fails to work.
This is a link:
https://drive.google.com/file/d/1sggfULJW-Dr8sQ80VWUIkrglrBwXWvZy/view

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

 
Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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