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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
strangerMike
Helper II
Helper II

DAX Syntax

Hello,

 

I am trying to create a New Column,  but I get this error:

 

A circular dependency was detected: View_EmailMetricsUnionNatural[CurNumBounces], View_EmailMetricsUnionNatural[CurEmailsSent], View_EmailMetricsUnionNatural[CurNumBounces].

 

Here is the Formula:

 

CurNumBounces = IF(View_EmailMetricsUnionNatural[Metric Name] = "# of Bounces",View_EmailMetricsUnionNatural[Cur Mo Cur Yr],0)

 

 Do you know what it is saying and how can I fix it?

 

thanks

 

Also is there a power bi site that gives lots of examples?

It seems I can find sites that list all of the functions but are void of good samples.

10 REPLIES 10
MFelix
Super User
Super User

Hi @strangerMike,

Try this change to your measure:

CurEmailsSent = IF(
Contains(View_EmailMetricsUnionNatural[Metric Name], "# emails sent"),
[Cur Mo Cur Yr],
0
)

Regards,
MFelix

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Also I tried your example for a new measure and i got this error:

Too few arguments were passed to the CONTAINS function. The minimum argument count for the function is 3.

 

Thanks

Thanks MFelix,

 

Please reread the post (I edited it).

I was successful creating a new Column instead of a measure.

 

However I tried creating another new column and I received the error you see in the post.

 

Any ideas? Thanks

 

PS. after reading about measures, perhaps the new column is not the way to go!  I am confused!

well circular dependency is when 1 calculated field requires another which in turn is dependent upon the original - or - an equivalent of that via the joins between tables - or - an IF/SWITCH statement with the same issue

 

not sure exactly which phrase we're discussing .......

www.CahabaData.com

Thanks CahabaData

 

So this is the formula causing the dependency issue:

 

CurNumBounces = IF(View_EmailMetricsUnionNatural[Metric Name] = "# of bounces",View_EmailMetricsUnionNatural[Cur Mo Cur Yr],0)

 

The odd thing is I just created this one without any errors:

CurEmailsSent = IF(View_EmailMetricsUnionNatural[Metric Name] = "# emails sent",View_EmailMetricsUnionNatural[Cur Mo Cur Yr],0)

Hi @strangerMike,

Please check your data according to @CahabaData posted. The syntax of your formula is right. Just like [CurEmailsSent] measure, it works fine.

Thanks,
Angelia

Hi Angelia

I looked through the article about the circular dependancy.

I went back through the queries and included a RecId which is a unique identifier. I was hopeing this would satisfy

the:  "You can manually set the property of Row Identifier for ProductKey to TRUE...." is this something that takes place in Desktop?

When I 'Edit Query', is there something there i need to turn on to have power bi recognize it? 

 

Assuming the addition of RecId might help, I tried to create the second new column and I still get the Circ. Dependency error.

Is there something else i need to do?

 

 

Col1 = IF(View_EmailMetricsUnionNatural[Metric Name] = "# of bounces",View_EmailMetricsUnionNatural[Cur Mo Cur Yr])

Success

 

Col 2= IF(View_EmailMetricsUnionNatural[Metric Name] = "# emails sent",View_EmailMetricsUnionNatural[Cur Mo Cur Yr]) 

Fails

 

Thank you

Hi @strangerMike,

It's still confusing. Which article did you read? Could you please share your .pbix file for further analysis?

Best Regards,
Angelia

Hi Angelia, How do I go about getting you the .pbix file?

You can post a link to shared drive or if you use Firefox browser there should be an "attachement" option in the message window

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.