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
mshparber
Advocate I
Advocate I

ALLEXCEPT entire table

I am trying to build a measure that removes filters from any table, except for Calendar. I try to do:

= CALCULATE([Sales Amt], ALLEXCEPT(Calendar)

but it requires specific columns. 
Maybe this should work?

=CALCULATE([Sales Amt], ALL(), VALUES(Calendar))

or does VALUES also require columns?

1 ACCEPTED SOLUTION
CNENFRNL
Community Champion
Community Champion

In CALCULATE(), tables can be used as filter modifiers; thus you can author DAX formula this way,

= CALCULATE([Sales Amt], ALL(), Calendar)

Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

5 REPLIES 5
CNENFRNL
Community Champion
Community Champion

In CALCULATE(), tables can be used as filter modifiers; thus you can author DAX formula this way,

= CALCULATE([Sales Amt], ALL(), Calendar)

Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Thanks!

I've checked and both syntaxes work:

=CALCULATE([Sales Amt], ALL(), VALUES(Calendar))

=CALCULATE([Sales Amt], ALL(), Calendar)

So, what does the values do if used on the whole table?

When a table name is given, VALUES(tablename) returns a table with the same columns and all the rows of the table (including duplicates) with the additional blank row if present.

VALUES – DAX Guide


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but I assume your fact table and a calendar table are connected via [Date] column.

Please try the below measure.

 

new measure: =
CALCULATE (
    [Sales Amt],
    ALLEXCEPT ( 'Your fact table', 'Your fact table'[Date] )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

No, this will not work.
It is not how it works in data models in Power BI

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.