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
Voose
Helper III
Helper III

Calendar relationship issues

Hi All,

 

I'm trying to pull a basic data through my calendar so I can see values over time.

 

I have a Calendar table that calculates by taking the min and max value of my date field. 

 

My opportunity date field is comprised of a formula that states if(isblank(historicaldate),createddate,historicaldate).

 

Now my Historical dates all map properly through the relationship of the calendar. However any of the dates that are from the createddate column do not use the relationship and act as if there is no relationship at all between the opportunity date field and the calendar date field.

 

all 3 columns (historical date, created date, date (calendar date)) all have the exact same formatting...

 

Any ideas guys?

 

Thanks

 

Voose

1 ACCEPTED SOLUTION
v-yuezhe-msft
Employee
Employee

@Voose,

Please review my reply in this similar thread, the above issue could occur when you change the format of the opportunity Date field from DateTime to Date, in this scenario, not all the datetime values in your opportunity table match the date values in your calendar table.

Regards,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

12 REPLIES 12
v-yuezhe-msft
Employee
Employee

@Voose,

Please review my reply in this similar thread, the above issue could occur when you change the format of the opportunity Date field from DateTime to Date, in this scenario, not all the datetime values in your opportunity table match the date values in your calendar table.

Regards,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you Linda!

 

This was my issue and its fixed now 🙂

vanessafvg
Super User
Super User

is your relationship of your calendar date mapped to opportunitydate?

 

does the calendar date include all dates from opportunity date





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




YEp it is mapped to that date, and the calendar object is made up of Min(opportunity date) and Max(opportunity Date)

IF I change the parameters of the If statement to = historical date

 

It pulls through the date fine using the relationship as expected,

 

If I change the parameters of the column to = createddate 

 

Nothing pulls through

that is strange, if you created the opportunity date in power query rather than dax in a calculated column would that make a difference maybe?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




How would I create it in Power Query? -> Edit Queries then? - I can't merge it with my Calendar tables as obviously thats  a calculated table 😞

what i would do is first try and figure out why the date is not working in the one you have created i.e create 2 columns opporunitydate 1 and opportunitydate 2 one without createddate and one with and see where the differences are and see if you can correct it in the if statement.

 

 

it is hard to figure out what the issue is without seeing the structure of your tables, if you could post a screen shot of your relationships that might help.

 

the power query option is for me a better option because its shaping the data how you want it,  i.e create calculated column exactly like you have in dax in the table you currently have it, unless the table its created in now is the calculated table that is calculated in dax not power query ?  i.e in power query add column / create custom column and then have the same if statement i.e 

 

if historical date = "" then createddate

else historicaldate

 

i am not sure what difference it would make but it might.

 

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Going to try and make this simpler:

 

Calendar issues.pngCalendar issuev2.png

 

Hopefully these diagrams should be really clear as to whats happening with my data 😞

 

Let me know

 

Thanks

 

Voose

@Voose nothing sticks out as obvious to me

 

but maybe it would  be best to create the min and max of the calendar date based on the opportunity created date (im assuming that what your if column is made up of) because based on what you said previously that should be the combo of the 2, rather than creating it on min of historic and the max of opportunity snapshot.

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Done & Still no solution 😞

If you want to post your pbix here i can have a look at it but i think you probably have to dig into your date field to find the issue, something isnt tallying up, personally i would push this sort of tranformation into power query.





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




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.