Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
I had created a dataset directly in PowerBI Desktop.
It pulls data from a postgres db, and does some transforms on it, and then that dataset is used in some reports.
I re-created the same data using a datamart, which all seemed to go pretty smoothly, but there's a weird difference that I can't figure out where it's coming from.
Ultimately, the weird difference is that using the datamart-generated dataset, my `Date` field doesn't contain a hiercharchy, where I could choose different levels of aggregation (year/month/day/etc.). When I use my manually created dataset from PowerBI Desktop, however, it does have the hiercharchy.
I tried right-clicking on the `Date` field in my datamart report and chose "create hierarchy", and it created a new measure, but it doesn't have any of the actual aggregations under it. It just has "Date Hierarchy" as the masure name, with just "Date" underneath it.
One other strange thing I've noticed, which may or may not be related, is that for whatever reason when I look at the "Column Tools" for the `Date` field in both files, when using the manually-generated dataset, it shows up as a `Date` datatype. But when looking at the datamart version, it shows up as a `Date/time` datatype.
But when looking at the column in my datamart transformations, it is absolutely a `date` datatype.
I'm pretty new to PowerBI, so I may be missing something simple here.
I have no relationships tied to this field in either of the reports, so it's definitely not used on the "many" side af a 1:many relationship.
It's also been a few months since I created the initial report, so maybe I did some sort of transformation on the field to get the hiercharchy to show up and I'm just not remembering that. But it's been driving me a bit crazy for the past few days trying to figure out why the datamart-generated field is showing up differently.
Solved! Go to Solution.
Hi @radious-pro ,
According to the information you provided, you are using the DirectQuery mode. Being unable to use the date hierarchy is a known limitation of DirectQuery, which is by design.
We need to be aware here regarding the date hierarchy.
When the above conditions are met, the date hierarchy will work for you.
Best Regards,
Community Support Team _ Caitlyn
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi @radious-pro ,
According to the information you provided, you are using the DirectQuery mode. Being unable to use the date hierarchy is a known limitation of DirectQuery, which is by design.
We need to be aware here regarding the date hierarchy.
When the above conditions are met, the date hierarchy will work for you.
Best Regards,
Community Support Team _ Caitlyn
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for confirming this. I was able to just add an additional column to my dataset manually to get the date I was hoping for here. It's unfortunate there isn't a way to support this via a live connection, but I'm sure it's for a reasonable reason.
Oh. I also see that the "Storage mode" for my table is set to "DirectQuery", which looks like that will prevent auto-creation of date hierarchies. I also don't see a way to change that value for my table, as the dropdown is greyed out.
Is there no way to use this feature with a datamart then?
One additional bit of information that may be helpful, is that in my fields list, on the version that is working as expected, all of my `date` fields have the calendar icon next to them. However, on the version that is not working, none of my `date` fields have the calendar icon next to them.