Forum Discussion
edhans
8 years agoCommunity Champion
How to filter with multiple values in multiple columns
I am trying to filter a table based on two columns. The table is layed out as shown below. What I want is: Give me all rows where: hst_year >= 2014 and hst_prd > 1 (that is the easy part) and ...
- 8 years ago
Hi edhans,
I want Jan 2014 - Sep 2017.
2014, 1-12
2015, 1-12
2016, 1-12
2017, 1-09
You should be able to use the M query below to filter the date column in this scenario. :smileyhappy:
FilterRows = Table.SelectRows(dbo_DimDate, each ([CalendarYear]*12+[MonthNumberOfYear]>=(2014*12+1))and(([CalendarYear]*12+[MonthNumberOfYear]<=(2017*12+9)))) in FilterRowsRegards
v-ljerr-msft
8 years agoMicrosoft Employee
Hi edhans,
I want Jan 2014 - Sep 2017.
2014, 1-12
2015, 1-12
2016, 1-12
2017, 1-09
You should be able to use the M query below to filter the date column in this scenario. :smileyhappy:
FilterRows = Table.SelectRows(dbo_DimDate, each ([CalendarYear]*12+[MonthNumberOfYear]>=(2014*12+1))and(([CalendarYear]*12+[MonthNumberOfYear]<=(2017*12+9))))
in
FilterRows
Regards
edhans
8 years agoCommunity Champion
Thank you. Let me give this a shot today.