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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
bbeer
Frequent Visitor

Date hierarchy doesn't work with shared data source

Hi,

 

I have a shared power bi data source and am trying to write a DAX formula utilizing the date hierarchies. 

The measure formula works in the original report, but when I try to create a new similar measure in the new report I get an error on the .[Year]

 

My measure is:

Change % YoY A = IF(
ISFILTERED(
'Date'[ReportingDate].[Year]
),
CALCULATE(
IFERROR(
[A % Change Year], BLANK()
), 
CROSSFILTER(
'Date'[ReportingDate],Revenue[ReportingDate], Both
)
)
)
 
Is it because I'm using a shared data source?
 
Thanks for the help,
bbeer
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@bbeer, for these cases it is best to create a date table with the required column and, if necessary, create a custom hierarchy

To get the best out of the time intelligence function. Make sure that you have a date calendar and that it has been marked as the date in the model view. Also, join her with the date column of your events. Recommended:
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions

create a new hierarchy
https://www.tutorialgateway.org/create-hierarchy-in-power-bi/
https://www.youtube.com/watch?v=x6vXVJZ_eTY



We appreciate your congratulations.

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@bbeer, for these cases it is best to create a date table with the required column and, if necessary, create a custom hierarchy

To get the best out of the time intelligence function. Make sure that you have a date calendar and that it has been marked as the date in the model view. Also, join her with the date column of your events. Recommended:
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions

create a new hierarchy
https://www.tutorialgateway.org/create-hierarchy-in-power-bi/
https://www.youtube.com/watch?v=x6vXVJZ_eTY



We appreciate your congratulations.

Thank you very much for your quick response.

 

I already had a date table in my shared source, so I assumed I could just use that one.

 

Fortunately, I was able to solve my problem using the Year-over-year quick measure function.

 

Thank you again, your links will definitely come in handy in the future!

bbeer

Hi  @bbeer ,

 

Glad to hear that,could you pls mark the reply as answered to close it?

Much appreciated!

 

Best Regards,

Kelly

If I have solved your issue,pls mark my reply as answered!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.