Forum Discussion
Data Weird Problem
- 5 years ago
Hi, Anonymous
There is no built-in date hierarchy when use DirectQuery. You may try creating a hierarchy manually as below.
Temp:
You may create two calculated column as below.
Year = YEAR([Date])Month = MONTH([Date])Then you could right-click the 'Year' column=>'new hierarchy'=>drag 'Month' column into the hierarchy.
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I understand you correct you're looking for something similar to Excel filters where you can select/deselect the entire month or year when filtering date column. This is now how it works in Power Query. To filter your data by year/month without manual code editing use Date Filters menu:
For more advanced filtering you can edit M code manually to add a required combination of Date.Year(), Date.Month() and/or other Date functions.