Forum Discussion
Hierarchies in Tables when using Direct Lake mode
- 2 years ago
Hello,
Not sure if you guys managed to solve the issue with the Hierarchy.
After spending some time trying I found a solution:
First I created a DimDate table and populated it using a stored procedure in my Fabric Warehouse:
(This DimDate table is to attend my needs, you may need something much simpler)
DimDate Table:
The you create and run the Stored Procedure: (you can reduce the range of dates, otherwise it will take around 25 min to complete running the query). * The holiday attributes you can update separatelly as you wish.
Once the above is done, you need to do some setups in the semantic Model view:
1 - Refresh your Semantic Model
2 - Right click on your DimDate Table and select "Make as Date Table"
3 - Toggle the button "On" and select "Date", Fabric has a bug that allows you to selec attributes with repeated values, but if you choose it the date Table won't work correctly, you need to choose an attribubute with unique values, so choose "Date".
4 - Create a Hyerarchy for CutOffDate:
5 - Set the correct attributes to your hierarchy
6 - In order to solve the sorting problem for Alphabetic attributes such month and quarters, you need to do the following:
For each alphabetic attribute (CutOffMonthName and CutOffQuarterName) you need to choose in Sort by column the corespondent numeric attribute CutOffMonthName = CutOffMonth.
Once the above is done, you are good to go to your powerbi report:
First, refresh you report;
Second, drag and drop the CutOffDate Hierarchy to you X-Axis of you chart (In case of Vertical Bar Chart):
As you will see below, the hierarchy is built automatically.
Then, you can drill your visual char as you want:
HOPE THE ABOVE COULD HELP SOME OF YOU THAT COULDN'T FIGURE OUT THIS DIRECTLAKE LIMITATION.