Forum Discussion
Barry_Kelly
9 years agoNew Member
Date.IsInPreviousNDays M code question
Date.IsInPreviousNDays([Text Range], 2) I'd like to use this function to dynamically query a fact table based on a slicer selection. Being unfamiliar with M, can another query, function or customi...
- 9 years ago
You can either:
Add 1 step to your first query: select the value, so the output of the query will be 1 value and you can replace the 2 in your function by <NameOfYourFirstQuery>.
Or
Replace the value 2 in your function by: Table.FirstValue(<NameOfYourFirstQuery>).
I would prefer the first option.
Barry_Kelly
9 years agoNew Member
This is a representaion of the Excel Table. I'll followup with two more posts showing the Power Query side.
Barry_Kelly
9 years agoNew Member
This shows the results from the slicer in Power Query.