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
Anonymous
Not applicable

Calculated Column DAX syntax issue

Hi all, here my issue... 

I have this table where each raw is a project (with a 'project number', a 'report date', a 'last update date', and a 'project status'). This table is weekly updated, so a same project (=same 'project number') appears several time in the table, but with a different report date (=date of the weekly update), a eventually a different project status and a different 'last update date'.

I'd need to create a calculate column, which calculate for every project ('project number') the date ('last update date') when the project status moved to "in progress"... I've tried the following, but ended up with a circular dependency:

 

In progress date =
var myproject='mytable'[project #]
var temp= CALCULATETABLE('mytable','mytable'[project #]=myproject,'mytable'[project status]="In Progress")
return
FIRSTDATE(SUMMARIZE(temp,'mytable'[Last Updated Date]))

 

Would have have a solution to solve this?

Thx!!!

1 ACCEPTED SOLUTION
DAX0110
Resolver V
Resolver V

Hi @Anonymous,  if you rewrite the calculated column this way, you can avoid the circular dependency error:

 

In progress date =
var myproject='mytable'[project #]

return CALCULATE(

    MIN( 'mytable'[Last Updated Date] )

    , ALL( 'mytable' )

    , 'mytable'[project #] = myproject

    , 'mytable'[project status] = "In Progress"

    )

 

View solution in original post

3 REPLIES 3
DAX0110
Resolver V
Resolver V

Hi @Anonymous,  if you rewrite the calculated column this way, you can avoid the circular dependency error:

 

In progress date =
var myproject='mytable'[project #]

return CALCULATE(

    MIN( 'mytable'[Last Updated Date] )

    , ALL( 'mytable' )

    , 'mytable'[project #] = myproject

    , 'mytable'[project status] = "In Progress"

    )

 

Anonymous
Not applicable

Hi @DAX0110!

brilliant, works perfectly. Why does it look so easy after I've read your proposal, and so tricky before? 🙂

You're welcome @Anonymous, circular dependency always gives me a headache ;), so I had to start from scratch...

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.