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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Anonymous
Not applicable

ALLEXCEPT problem

I have a simple table set up:

Tables.png

I'm creating an array that uses a DateDimension[BiWeekly PPE] slicer.

For a row in the array, I need to override the slicer, as I need all numbers to be displayed after the date in the slicer.

I have tried the following:

Number.M =
Calculate(sum(Table2[Number]),
filter(ALLEXCEPT(Table2,Table2[UniqueID]),
Table2[Date]>SELECTEDVALUE(DateDimension[BiWeeklyPPE])))
It's very close to being correct, but I need the Table1[Name1] data in the array and I can't figure out how to filter properly.

Result I get:

Wrong.png

Result I need:

Right.png

Edit:

If I use Table2[UniqueID] as the column entity, it works. so I guess something to do with using Table1[Name1] as a column header.

Any way to fix it?

Appreciate any ideas; TYIA

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Ok! Table 1 needs added to AllExcept filter:

Number.M =
Calculate(sum(Table2[Number]),
filter(ALLEXCEPT(Table2,Table1,Table2[UniqueID]),
Table2[Date]>SELECTEDVALUE(DateDimension[BiWeeklyPPE])))

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@Anonymous , better to use after date slicer. You have an option for between, before, and after, and the small down arrow

If you want to display more dates than you have selected, you need an independent date table

 

 

//Date1 is independent Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date1),Date1[Date])

Calculate(sum(Table2[Number]),
filter(ALLEXCEPT(Table2,Table2[UniqueID]),
Table2[Date]>_max ))

 

Assuming the rest of the code is correct

 

Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak 

"better to use after date slicer. " use what after the date slicer?

"You have an option for between, before, and after, and the small down arrow" for what?

"If you want to display more dates than you have selected, you need an independent date table" sorry if this wasn't clear - the DateDimension in the picture above is a date table. it has dates spanning 3 years.. I was just giving a sample

 

//Date1 is independent Date table, Date is joined with Table  yes, that is how DateDimension[Date] is


new measure =
var _max = maxx(allselected(Date1),Date1[Date])

Calculate(sum(Table2[Number]),
filter(ALLEXCEPT(Table2,Table2[UniqueID]),
Table2[Date]>_max ))

 

This returned the same result:  Wrong.png

 

Edited to add: it's the "ALLEXCEPT(Table2,Table2[UniqueID]" that doesn't seem to do what I expect it to do in this context.. 

@Anonymous , Options

amitchandak_0-1646190691593.png

 

 

When you select a date, you get data for more than the selected date. But you can display dates more than that. there you need an independent date table. I have shared video link for that

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak oh i see your meaning. I'm using dropdown in the slicer. User selects a BiWeekly PPE.

 

The issue is I am losing the relationship between Table1 and Table2 with this formula.

Column Headers come from Table1; Number.M needs to come from Table2.

If I set it up so that the Column Headers came from Table2 it would work fine, but it's not possible. How to restore the relationship/link between the tables?

Anonymous
Not applicable

Ok! Table 1 needs added to AllExcept filter:

Number.M =
Calculate(sum(Table2[Number]),
filter(ALLEXCEPT(Table2,Table1,Table2[UniqueID]),
Table2[Date]>SELECTEDVALUE(DateDimension[BiWeeklyPPE])))

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.