Forum Discussion
Anonymous
6 years agoNot applicable
Help with filter and measures
Hello Community, I'm new in the PBI and need some help from the start. For example I have this table: Name Food Date Raul Bread 01/06/2020 Raul Bread 01/06/2020 Raul Bread 01/0...
- 6 years ago
Anonymous
for me it works. check my attached pbix
az38
Community Champion
6 years agoHi Anonymous
1. create a calendar table like
CalendarTable = CALENDAR(DATE(2020,1,1),DATE(2020,12,31))
2. create relationship between calendar table and Planilha1 table by date field
3. Add CalendarTable[Date] to date slicer visual
4. create a measure in Planilha1 table
Count Food =
VAR MaxDate = CALCULATE(MAX(CalendarTable[Date]))
VAR MinDate = CALCULATE(MIN(CalendarTable[Date]))
RETURN
CALCULATE(COUNTROWS(Planilha1), FILTER(ALL(Planilha1), Planilha1[Date] >= MinDate && Planilha1[Date] <= MaxDate))