Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello,
I have a problem using power BI direct quiery.
I'm working with data date, and even if in power BI editor quiery the values are recognized as a date, when I use the data for the creation of contents, they are seen as nominal data. Losing the possibility to select and show just the months for example..
How can I do? Thanks in advance 🙂
Solved! Go to Solution.
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.
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.
Thanks @avatorl for the reply. I try to explain me better.
The main problem is when I work with the direct query. My goal is to create a graph like this one:
In which my data are divided per month, and this I can easily do it with the static data, because the value of the date are recognized as such. And I can easily filter directly from the axis. (like this)
On the contrary, when using direct query, it does not recognize the date! And is almost impossible to me show the division per month but only per day! And I have something like this!
I also tried coding, but it says to me that is impossible using direct query.
It's all the morning I look for this solution, but I can't find it the appropriate one...
I'll be glad if you can help me!!!
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.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
12 | |
8 | |
8 | |
7 |
User | Count |
---|---|
15 | |
13 | |
9 | |
7 | |
6 |