Forum Discussion
Create a relationship between column created via LOOKUPVALUE and the source column
Yeah, that would definitely be a circular dependency and DAX is seriously not OK with that. If you could provide some sample/example data, this would be far easier to understand and see if there is a better way.
No worries, I'll provide some pictures and show what I've been doing already.
So here is how I'm doing right now (with another table, "Vertical").
Both the "CRM" and "Meta" tables also have "Vertical" fields, and I created this relationship below so I can apply one filter to alter visuals based on both tables.
I'm trying to do the same with the "Clients" field on both table. However, these columns differ a bit from each other.
Let's say that in the CRM table I have something like this:
Stage | Value | Client
Stg 1 | 1000 | Client A
Stg 2 | 2000 | Client B
Stg 1 | 1000 | Client C
And in the "meta" table I have yearly goals for both Client A and Client B, but no C, so I'd like to create another column which would return me something like:
GoalsClient
Client A
Client B
Other
Now, I did this with LOOKUPVALUES, just looking for the client in the column and, in case of blank, fill it with "Other".
Then I would like it to a Unique Values table, just like I did with "Vertical" and I'd create a slicer to filter my visuals.
The code right now to the LOOKUPVALUES looks like this:
ClienteMeta = IF(
ISBLANK(LOOKUPVALUE('Info cliente'[teste], 'Info cliente'[Cliente], 'CRM - Acompanhamento geral'[Cliente])) = FALSE(),
LOOKUPVALUE('Info cliente'[teste], 'Info cliente'[Cliente], 'CRM - Acompanhamento geral'[Cliente]),
"Outros/Pulverizado"
)(The LOOKUPVALUES is looking up to the Unique Values table, not the "Meta[Client]" column (it returns circular dependency anyway))
Is it clearer now?
Thank you very much