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! Request now

Reply
BugmanJ
Helper V
Helper V

ALLEXCEPT causing start line on Graph

Good Day,

I currently have the following equation working:

 

 

 

CountCakeRecords = 
CALCULATE(
    DISTINCTCOUNT('Sales'[TicketNumber]),'Sales'[Linewait]<25,
                ALLEXCEPT(
                    'Calendar','Calendar'[Month Year Name])
)

 

 

 

and this allows me to graph the number of sales made per month where the linewait was less then 25 (minutes). Works perfectley. Problem is when I want to filter by shop. I want to have a graph where the line DOES NOT filter when i change the shop (so i can have two lines, one showing all the shops, the other the particular shop in question)

I tried adding this code as part of the equation above:

 

 

 

        ALLEXCEPT(
        'Sales',
        'Sales'[Shopname] 
                )

 

 

 

But then the nice graph just becomes a straight line. My graph should look like (Dark line is overall, green line for shop)

BugmanJ_0-1671535511332.png

 

 

Test Data:

Ticket NumberShopMonth Year NameMonth Year NameWaitTime
234Shoreditch15/02/2020Feb - 202215
370Chelsea15/02/2020Feb - 202228
496Tottenham Court Road16/02/2020Feb - 202218
236Shoreditch17/02/2020Feb - 202220
429Oxford Circus19/02/2020Feb - 202220
469Oxford Circus19/02/2020Feb - 202224
112Chelsea20/03/2020Feb - 202224
230Chelsea20/03/2020Feb - 202223
382Tottenham Court Road21/03/2020March - 202223
165Shoreditch21/03/2020March - 202221
395Tottenham Court Road22/03/2020March - 202225
262Oxford Circus23/03/2020March - 202226
233Shoreditch23/02/2020March - 202223
104Chelsea24/02/2020March - 202223
182Shoreditch25/02/2020March - 202224
109Oxford Circus25/02/2020March - 202222
226Tottenham Court Road25/02/2020March - 202224
457Tottenham Court Road27/02/2020April - 202225
188Oxford Circus27/02/2020April - 202223
328Oxford Circus27/02/2020April - 202221
200Chelsea29/02/2020April - 202223
332Chelsea01/03/2020April - 202225
128Chelsea01/03/2020April - 202220
412Tottenham Court Road02/03/2020April - 202223
366Oxford Circus02/03/2020April - 202224
362Tottenham Court Road03/03/2020April - 202225


What am i doing wrong?
Thanks

1 ACCEPTED SOLUTION
MAwwad
Solution Sage
Solution Sage

Try:

CountCakeRecords =
CALCULATE(
DISTINCTCOUNT('Sales'[TicketNumber]),
'Sales'[Linewait]<25,
ALL('Calendar'),
ALL('Sales')
)

 

This measure will count the number of distinct ticket numbers where the linewait is less than 25 minutes, ignoring any filters that are applied to the 'Calendar' and 'Sales' tables. You can then use this measure in a chart or table visualization and apply filters to the visualization to see the results for different shops.

View solution in original post

3 REPLIES 3
BugmanJ
Helper V
Helper V

@MAwwad 
Actually if I remove the ALL('Calendar') it then works just fine. Thank you!

MAwwad
Solution Sage
Solution Sage

Try:

CountCakeRecords =
CALCULATE(
DISTINCTCOUNT('Sales'[TicketNumber]),
'Sales'[Linewait]<25,
ALL('Calendar'),
ALL('Sales')
)

 

This measure will count the number of distinct ticket numbers where the linewait is less than 25 minutes, ignoring any filters that are applied to the 'Calendar' and 'Sales' tables. You can then use this measure in a chart or table visualization and apply filters to the visualization to see the results for different shops.

Hi @MAwwad 
Sorry this still produces a straight line. I have edited original question for more content/test data

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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