This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi All,
I want to make calculations Current year*,that ignore my filter selections
*Current Year calculation is sum of amount of Max of Current year in AP_Database table
here are my scheme :
Date.Clearing one to many AP_Database.Clearing
but it seems doesn't work.
When i filtered table Date, it also filtered the Current Year New
Solved! Go to Solution.
Hi @adityo ,
It is because you are using ALL() function in the formula. Try using ALLEXCEPT() function instead.
measure 1 = CALCULATE(SUM(AP_Database[Amount in local cur.]),FILTER(ALLEXCEPT(AP_Database,AP_Database[category]), YEAR(AP_Database[Clearing])=MaxYear))
measure 2 = CALCULATE(SUM(AP_Database[Amount in local cur.]),FILTER(ALL(AP_Database), YEAR(AP_Database[Clearing])=MaxYear&&AP_Database[category]=SELECTEDVALUE(AP_Database[category])))
If both the above measures don't work, please show some sample data and expected result to us.
Best Regards,
Jay
Hi @adityo
Im aorey but this is one of the worst advice I saw on this forum.
For god sake, dont use filter( All(Ap_database)). What if this table has million rows, you will end up iterating on all the rows.
The approach from @amitchandak is really better in this case.
@Anonymous it seems work.... it calculates the current year. but i think it will mislead the context. while im using matrix for the visualization, all the number are same for all category....
Hi @adityo ,
It is because you are using ALL() function in the formula. Try using ALLEXCEPT() function instead.
measure 1 = CALCULATE(SUM(AP_Database[Amount in local cur.]),FILTER(ALLEXCEPT(AP_Database,AP_Database[category]), YEAR(AP_Database[Clearing])=MaxYear))
measure 2 = CALCULATE(SUM(AP_Database[Amount in local cur.]),FILTER(ALL(AP_Database), YEAR(AP_Database[Clearing])=MaxYear&&AP_Database[category]=SELECTEDVALUE(AP_Database[category])))
If both the above measures don't work, please show some sample data and expected result to us.
Best Regards,
Jay
Thx @Anonymous it works perfect!
@adityo , Try one of the two
Current Year New =
var MaxYear = year(today())
RETURN
CALCULATE(SUM(AP_Database[Amount in local cur.]),FILTER(ALL('Date'[Year Outgoing]), 'Date'[Year Outgoing]=MaxYear))
Current Year New =
var MaxYear = maxx(all('Date'), 'Date'[Year Outgoing])
RETURN
CALCULATE(SUM(AP_Database[Amount in local cur.]),FILTER(ALL('Date'[Year Outgoing]), 'Date'[Year Outgoing]=MaxYear))
@amitchandak thank you for your response, unfortunately both of them doesn't works. the DAX script doesn't return error. but it keep filtered.
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 27 | |
| 26 | |
| 22 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 45 | |
| 42 | |
| 41 | |
| 21 | |
| 18 |