I want to create a column in the fact table (using power query) that returns the days between two dates. My fact table is connected with the date table using date column. Fact table has two other columns: Event_start_date and Event_end_date. I want to create column that returns the days between two dates (i.e. Event_start_date & Event_end_date) and exclude the weekends (i.e. Saturday and Sunday). Date table contains days name.
I tried something like follow:
Days diff = Table.RowCount(Table.SelectRows(dates,each(dates[date]>=[Event_start_date] and dates[date]<=[Event_end_date])))
Obviously it didnot work. Could anyone help me how to fix the issue?