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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
nerdyplayer
Helper I
Helper I

Counting recommendations for a project to display null

I have a recommendation SP list that feeds off a project list.


I have 2 count formula that counts the # of opened or Closed recommendations for a project.

But, on the main page, when I try this it will filter out the projects with no recommendations, which is not what I want. I want it to show a 0 or leave blank. My code isn't working correctly, can I get some advice?

I'm thinking if I need to create a new column, and write another formula.

 Thoughts ( if recommendation > 0, count row, else "0"  )

 

ty

 

CALCULATE(COUNT(EARecs[Closure Accepted]),EARecs[Closure Accepted]="Yes")



CALCULATE(COUNT('EARecs'[Closure Accepted]), EARecs[Closure Accepted] <> "Yes"

 

 

1 ACCEPTED SOLUTION
v-yohua-msft
Community Support
Community Support

Hi, @nerdyplayer 

Your idea is correct, you can try the following DAX expressions, create four measures

 

Open Recs Count = CALCULATE(COUNT(EARecs[Closure Accepted]), EARecs[Closure Accepted] = "Yes")

Closed Recs Count = CALCULATE(COUNT(EARecs[Closure Accepted]), EARecs[Closure Accepted] <> "Yes")

Open Recs Display = IF([Open Recs Count] > 0, [Open Recs Count], 0)

Closed Recs Display = IF([Closed Recs Count] > 0, [Closed Recs Count], 0)

 

 

How to Get Your Question Answered Quickly 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data)

Best Regards

Yongkang Hua

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

1 REPLY 1
v-yohua-msft
Community Support
Community Support

Hi, @nerdyplayer 

Your idea is correct, you can try the following DAX expressions, create four measures

 

Open Recs Count = CALCULATE(COUNT(EARecs[Closure Accepted]), EARecs[Closure Accepted] = "Yes")

Closed Recs Count = CALCULATE(COUNT(EARecs[Closure Accepted]), EARecs[Closure Accepted] <> "Yes")

Open Recs Display = IF([Open Recs Count] > 0, [Open Recs Count], 0)

Closed Recs Display = IF([Closed Recs Count] > 0, [Closed Recs Count], 0)

 

 

How to Get Your Question Answered Quickly 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data)

Best Regards

Yongkang Hua

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.