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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Danfountain
Helper I
Helper I

DAX with Filter and All together.

Hi all,

 

I have these two DAX measures that seem to work as intended.

 

So this one counts all of the records that are deleted:

 

Mapping_Count = CALCULATE(

      COUNT(FACT_Mapping[MappingId]), FILTER(FACT_Mapping,'FACT_Mapping'[isdeleted]=FALSE))

 

And this one counts all of the records removing the calendar filter.

 

Mapping_Total = CALCULATE(

      COUNT(FACT_Mapping[MappingId]), ALL(CalendarTable)

)

 

Now I need a further measure that comibines the two (but with the isdeleted the other way around).  Remove the filter on the calendar table but only count the deleted.  This is what I have.... 

 

Mapping_Total_DELETED = CALCULATE(

      COUNT(FACT_Mapping[MappingId]),ALL(CalendarTable), FILTER(FACT_Mapping,'FACT_Mapping'[isdeleted]=TRUE))

 

But effectively the ALL(Calendar) table bit isnt working as intended as its still filtered based on the calendar table. 

 

Any ideas?

 

TIA

 

Dan

 

1 ACCEPTED SOLUTION
Gabriele_hbto
Helper II
Helper II

try this 

Mapping_Total_DELETED = CALCULATE(
COUNT(FACT_Mapping[MappingId]),
ALL(CalendarTable),
'FACT_Mapping'[isdeleted] = TRUE
)

View solution in original post

2 REPLIES 2
Gabriele_hbto
Helper II
Helper II

try this 

Mapping_Total_DELETED = CALCULATE(
COUNT(FACT_Mapping[MappingId]),
ALL(CalendarTable),
'FACT_Mapping'[isdeleted] = TRUE
)

Thank you.  I was obviously over complicating it!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.