Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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)
Test Data:
| Ticket Number | Shop | Month Year Name | Month Year Name | WaitTime |
| 234 | Shoreditch | 15/02/2020 | Feb - 2022 | 15 |
| 370 | Chelsea | 15/02/2020 | Feb - 2022 | 28 |
| 496 | Tottenham Court Road | 16/02/2020 | Feb - 2022 | 18 |
| 236 | Shoreditch | 17/02/2020 | Feb - 2022 | 20 |
| 429 | Oxford Circus | 19/02/2020 | Feb - 2022 | 20 |
| 469 | Oxford Circus | 19/02/2020 | Feb - 2022 | 24 |
| 112 | Chelsea | 20/03/2020 | Feb - 2022 | 24 |
| 230 | Chelsea | 20/03/2020 | Feb - 2022 | 23 |
| 382 | Tottenham Court Road | 21/03/2020 | March - 2022 | 23 |
| 165 | Shoreditch | 21/03/2020 | March - 2022 | 21 |
| 395 | Tottenham Court Road | 22/03/2020 | March - 2022 | 25 |
| 262 | Oxford Circus | 23/03/2020 | March - 2022 | 26 |
| 233 | Shoreditch | 23/02/2020 | March - 2022 | 23 |
| 104 | Chelsea | 24/02/2020 | March - 2022 | 23 |
| 182 | Shoreditch | 25/02/2020 | March - 2022 | 24 |
| 109 | Oxford Circus | 25/02/2020 | March - 2022 | 22 |
| 226 | Tottenham Court Road | 25/02/2020 | March - 2022 | 24 |
| 457 | Tottenham Court Road | 27/02/2020 | April - 2022 | 25 |
| 188 | Oxford Circus | 27/02/2020 | April - 2022 | 23 |
| 328 | Oxford Circus | 27/02/2020 | April - 2022 | 21 |
| 200 | Chelsea | 29/02/2020 | April - 2022 | 23 |
| 332 | Chelsea | 01/03/2020 | April - 2022 | 25 |
| 128 | Chelsea | 01/03/2020 | April - 2022 | 20 |
| 412 | Tottenham Court Road | 02/03/2020 | April - 2022 | 23 |
| 366 | Oxford Circus | 02/03/2020 | April - 2022 | 24 |
| 362 | Tottenham Court Road | 03/03/2020 | April - 2022 | 25 |
What am i doing wrong?
Thanks
Solved! Go to Solution.
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.
@MAwwad
Actually if I remove the ALL('Calendar') it then works just fine. Thank you!
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
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 93 | |
| 70 | |
| 50 | |
| 40 | |
| 39 |