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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Avoid blanks or zero's to calculate running total with filter

Hello All,

 

I am trying to calculate running count of distinct employees who are choached and i am able to get the result with below query.

Coached = 
CALCULATE( DISTINCTCOUNT(TimeOffDailyFact[EmployeeName_ID]),
    FILTER(
        ALLSELECTED(TimeOffDailyFact),
        
        TimeOffDailyFact[Coached_NonCoached] = "Coached" &&
        TimeOffDailyFact[FirstDayOfMonth] <= MAX(TimeOffDailyFact[FirstDayOfMonth])))

 

The result is workes fine but when a perticular month has no Coached employees, then it returns as blank as below image.

Mohan128256_0-1625567087231.png

 

Even if we have blank values, the prior value which is 10 should continue in this case.

 

Any help please.

 

Thanks,

Mohan V.

5 REPLIES 5
v-kelly-msft
Community Support
Community Support

Hi  @Anonymous ,

 

As tested here,it works fine:

vkellymsft_0-1625731843939.png

 

 

You could try to create a new measure as below:

 

Coached_total=SUMX(FILTER( ALLSELECTED(TimeOffDailyFact),
        TimeOffDailyFact[FirstDayOfMonth] <= MAX(TimeOffDailyFact[FirstDayOfMonth])),[Coached])

Pls note that the column "FirstDayofMonth" is a date format column which can be compared with.

 

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

Fowmy
Super User
Super User

@Anonymous 

You can turn off the Show Item with non-Data. 

Fowmy_0-1625569468298.png

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

Thanks for the reply @Fowmy.

 

I did tried that already, but nothing changed actually.

 

The values still shows the same.

 

 

Hi  @Anonymous ,

 

Have you checked my reply?Is your issue solved now?

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

@Anonymous 

Not sure how your model is formed, if you can share a sample power bi file with this scenario, it would great.

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors