The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
How can I use CALCULATE or FILTER to get all values except of the current month and year?
For example:
Current month and year today is April 2021.
=> Desired result is all values but not for April 2021
It should always refer to the current month and year automatically.
Solved! Go to Solution.
@TimmK , Try a measure like
CALCUALTE(Sum(Table[Value]) , filter(Table, eomonth(Table[Date],0) <> eomonth(today(),0)))
or with date table
CALCUALTE(Sum(Table[Value]) , filter(Date, eomonth(Date[Date],0) <> eomonth(today(),0)))
@TimmK , Try a measure like
CALCUALTE(Sum(Table[Value]) , filter(Table, eomonth(Table[Date],0) <> eomonth(today(),0)))
or with date table
CALCUALTE(Sum(Table[Value]) , filter(Date, eomonth(Date[Date],0) <> eomonth(today(),0)))
User | Count |
---|---|
27 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
32 | |
15 | |
12 | |
12 | |
7 |