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.
I see a few similar Dax queries to what I am trying to achieve but the only problem is I am not looking for a sum or total. I simple just want to filter the data set for last months data only. This is what I have so far but it is not working. Any ideas on how to get this to work?
DEFINE
VAR CostFilter = filter('Table01','Table01'[Date] >= date(year(now()),month(now()),1))
VAR Costcolumns = SUMMARIZECOLUMNS(
'Table01',
'Table01'[Tags - Copy.DepartmentNumber],
'Table01'[Tags - Copy.OwnerEmail],
'Table01'[Cost],
'Table01'[Date]
)
evaluate
Costcolumns
Hi @Anonymous
Please try
DEFINE
VAR CostFilter = FILTER(VALUES(Table01'[Date]), 'Table01'[Date] >= EOMONTH ( TODAY ( ), - 1 ) + 1 )
VAR Costcolumns = SUMMARIZECOLUMNS(
'Table01',
'Table01'[Tags - Copy.DepartmentNumber],
'Table01'[Tags - Copy.OwnerEmail],
'Table01'[Cost],
'Table01'[Date],
TREATAS ( CostFilter, 'Table01'[Date] )
)
evaluate
Costcolumns
User | Count |
---|---|
16 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
25 | |
13 | |
12 | |
8 | |
8 |