Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
some1else
Helper II
Helper II

Custom date table

I have created a custom date table and started creating the appropriated hierarchy.

However, I need to get the selected value of the year, but the measure only allows to select the date field, not the hierarchy.

If I use the auto date/time table option from Power BI, I can grab the selected value and perform the desired calculations, but not with the custom date table.

 

Any ideas?

4 REPLIES 4
Ethan96
Resolver I
Resolver I

Hi, @some1else 

Power BI provides built-in date hierarchies, but you can also go to Model -> Dates (right click)->create your own date hierarchies.

The solution in the following tutorial will help you.

Power BI Date Hierarchy 

 

Kind Regards,

Ethan

SpartaBI
Community Champion
Community Champion

@some1else if you are using the auto date time then you choose the date column you should see more options in the code like [date].[year]

SpartaBI
Community Champion
Community Champion

@some1else there shouldn't be a problem selecting the year column from a custom calendar. It's just like any other column in any other table. Can you share more info about what you don't succeed.  Better to also share a link to download a sample PBIX so I could take a look at your scenario.

2.jpg1.jpg

Left image: "Date Hierarchy" is based on the "Date". "Ano" was added to the hierarchy.
Right image: the measure. Whatever year I select on the slicer (based on "Ano"), every other visual filters accordingly, but the measure always calculate as -1 or Blank.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.