cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RvdHeijden Member
Member

Re: Calculating the average but also in a period

ive got the 'StartDate' working but the EndDate keeps returning an error

Formula:   EndDate = CALCULATE ( MAX('Date'[Date]); ALLSELECTED ( 'Date'[Date].[Date]) )

Error:         A circular dependency was detected: Date[StartDate], Date[EndDate], Date[StartDate].

 

2017-04-18_1131.png

Moderator v-yuezhe-msft
Moderator

Re: Calculating the average but also in a period

 

@RvdHeijden,

Create measures instead of columns using the following DAX in your date table.

StartDate = CALCULATE ( MIN ( 'Date'[Date] ); ALLSELECTED ( 'Date'[Date] ) )
EndDate = CALCULATE ( MAX('Date'[Date]); ALLSELECTED ( 'Date'[Date] ) )

Actually, you don't need to create StartDate and EndDate in your scenario, I just want to show you the number of weeks between two dates when selecting date range in Timeline.

Thanks,
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.
RvdHeijden Member
Member

Re: Calculating the average but also in a period

@v-yuezhe-msft Shouldn't there be a relationship between the 'Date' table and the 'Ticket' table ?

Otherwise it wont SUM the number of tickets entered in a given week right ?

Moderator v-yuezhe-msft
Moderator

Re: Calculating the average but also in a period

Hi @RvdHeijden,

Yes. Relationship should exist in Ticket table and Date table.

Thanks,
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.
RvdHeijden Member
Member

Re: Calculating the average but also in a period

@v-yuezhe-msft

Between what 2 colums should the relationship be ? i tried matching dates (one to many) between the Date table and the Ticket table but that doesn't work.

 

The Timeline visual doesnt even work if i have a relationship between Date (in table 'Date') and Startdatum (in table 'Tickets)

 

2017-04-19_0757.png2017-04-19_0757_001.png

Moderator v-yuezhe-msft
Moderator

Re: Calculating the average but also in a period

Hi @RvdHeijden,

Could you please share me your PBIX file via Private Message?

Thanks,
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

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 218 members 2,685 guests
Please welcome our newest community members: