The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 |
---|---|
16 | |
8 | |
7 | |
6 | |
5 |
User | Count |
---|---|
25 | |
13 | |
12 | |
8 | |
8 |