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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
cerebro
Helper I
Helper I

Apply FILTER to calculated YTD sum without removing the ALLEXCEPT groups

hello everybody,

 

could please someone help me with the formula

the expression for revenue ytd works perfectly for my needs:

YTD_Act = CALCULATE ((TOTALYTD(SUM(Table[REVENUE]),Table[INVOICEDATE].[Date],"31.03")-TOTALMTD(SUM(Table[REVENUE]),Table[INVOICEDATE])),

ALLEXCEPT ( Table, Table[CUSTOMER_NAME]))

 

but i also had to upload some budget data to the same query and now i try to add a filter expression

Filter(Table,(Table(Source)<>"Budget")

 

and if i put this at the end of the whole line

YTD_Act = CALCULATE ((TOTALYTD(SUM(Table[REVENUE]),Table[INVOICEDATE].[Date],"31.03")-TOTALMTD(SUM(Table[REVENUE]),Table[INVOICEDATE])),ALLEXCEPT ( Table, Table[CUSTOMER_NAME]), Filter(Table,(Table(Source)<>"Budget")) 

it doesn't recognise different customers for ytd revenue anymore and puts the same value (total revenue overall) in every line

 

Any ideas how to combine the expressions?

 

Thank you in advance

1 REPLY 1
VahidDM
Super User
Super User

Hi @cerebro 

 

It is because of that ALLEXCEPT ( Table, Table[CUSTOMER_NAME]) and Filter(Table,(Table(Source)<>"Budget")) in your code.

 

Can you share a sample of your data and result table here?

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos✌️!!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.