Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Currently i have a query that returns a bunch of log messages that I'm interested. For some of these messages, they have unique identifiers which means that when looking at the data in a matrix, each item takes up a separate row. To get around this, I have another query which has a mapping of strings with masks to the friendly message i want shown:
Pattern > NewMessage
"Time of day is: *" > "Time of day is: [TIME]"
"Product * was deleted" > "Time xxx was deleted"
...
To make this work, I have the property `Message` on the `ClientMessages` query that has the original content and a calculated property that has controls how the pattern is applied and returns the `NewMessage` based on the `Pattern` from the `_MessageOverride_` query. That query looks like the below:
MessageOverride =
VAR Matches =
CALCULATETABLE(
GENERATE(
ClientMessages,
FILTER(
_MessageOverride_,
SEARCH(
[Pattern],
[Message],
1,
0
)
>0)
)
)
VAR matchMessage = CONCATENATEX(
Matches,
[NewMessage],",")
RETURN IF(ISBLANK(matchMessage), [Message], matchMessage)
All the above works great, not a problem. The problems start when I try and do more "operations" based on this new `MessageOverride` column.
For instance, I have another table, which allows me to override the `Type` a given message has. This table looks like the below:
Message > NewType
"Time of day is: [TIME]" > Other
"Time xxx was deleted" > Crud
...
I went to setup a relationship between the `Message` column in this `_MessageTypeOverride_` query, to the new `MessageOverride` column from the above DAX query (so that I could have a new column based off it), but I end up getting the below circular dependency error. You will note that I want to be able to base the relationship off the result (i.e. "Time of day is: [TIME]") rather than the source (which has unique data in it).
> A circular dependency was detected: ClientMessages[MessageOverride], ClientMessages[TypeOverride], {GUID}, ClientMessages[MessageOverride]
TypeOverridden = VAR FaultTypeRelated = RELATED(_MessageTypeOverride_[NewType]) RETURN IF(ISBLANK(FaultTypeRelated), ClientMessages[FaultType], FaultTypeRelated)
I tried setting up the same DAX query I have for the old messages to new messages to try and get around the problem, but I ended up getting the same issue.
I know from reading hear - https://www.sqlbi.com/articles/avoiding-circular-dependency-errors-in-dax/ - why I am getting the circular reference, but I don't know how to do what I need to do differently to avoid the issue.
Thoughts?
According to your reference link, how about using ALLNOBLANKROW in a FILTER function when using CALCULATE or CALCULATETABLE?
Also, we need consider the relationship among tables used in these formula.
Could you share me some dataset or pbix including all columns and tables used in the formula above?
Best Regards
Maggie
After testing with your pbix, I find it doesn’t cause a circular dependency issue until editing the relationship between table “_FaultMessageTypeOverride_” and “ClientFaultEvents”.
As far as I know, the original relationship based on “ErrorMessage” column in both tables can work well, so maybe you don’t need to change this relationship.
Best Regards
Maggie
I agree that things currently "work" and that they break when I change the relationship between table “_FaultMessageTypeOverride_” and “ClientFaultEvents”, but thats the point.
The current relationship isn't correct. I need the relationship to change to be between _FaultMessageTypeOverride_[ErrorMessage] and ClientFaultEvents[ErrorMessage] to be between _FaultMessageTypeOverride_[ErrorMessage] and ClientFaultEvents[ErrorMessageOverride].
I understand that I might not be able to do what I want to do just via a simple relationship, but I need some way of being able to determine the "FaultType" off the "Overriden" error message.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 37 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 130 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |