Forum Discussion
Help with Relationships and Merging Queries !
Hi Pat,
Here are the relationships. The activity and plan are just the total so for each product it can be put into multiple parts and multiple geographys and the activity and plan are just the count of them. No special dax.
Sorry for the delay. Thank you for providing the model. I think the functionality you are looking for will be challening for a couple reasons - 1. your model is pretty complex and has multiple bi-directional relationships and 2. you are looking to use fields in your measure that are not in your visual. Having said that, your pics of the table visual looks like you are using two "GTM" columns, one from plan and one from activity. I think the key to what you are looking for will leverage the TREATAS() function to pass the values of GTM in one table to the GTM column in the other. Are the values the same in both columns?
If so, you can try this type of a measure pattern:
NewMeasure = Calculate([YourMeasure], TREATAS(Values(Plan[GTM]), Activity[GTM])) // or vice versa for Activity/Plan
The column in the VALUES() would be the one in the visual and can be used to filter the GTM column not included in the visual. Please let me know if this gets you any closer to your goal.
Regards,
Pat
- alisonpappas6 years ago
Helper III
Hi Pat!
Thanks for your help!
You can see above how the files have been able to affect the quieries made. I know the data is complex I can't merge them any farther Power BI runs out of data when I try and then still with the relationships they have to have no duplicates which is hard.
The DAX did work however I am wonderng if this may be a temporary fix? For example, now at the GTM level the total that does not match up to the next level, it is ignored which is what I wanted to see. However if I wanted to filter at a high level where it is included would I need to have a new DAX? Like because the ignored values I would want to come back in. Does this make sense?