Forum Discussion
Calculated Measure using result based on another column
Hi, I have a data set with list of sports teams and their actions during a game. I have a column for team and a column for their opposition and a calculated measure for number of tackles. Is there a calculated measure I can create that would show the opposition tackles for any given team instead of having to use them in seperate tables as seen below?
Hi jimmymartin ,
According to your description, in my understanding, there're two tables in your sample,
Team table:
Opposition table:
Then create a measure to extrat the tackles of the opposition team, if this is the case, here's my solution, use the lookupvalue-function to create a measure.
Opposition Tackles = LOOKUPVALUE ( Opposition[Tackles], 'Opposition'[Oppositon], MAX ( 'Team'[Team] ) )Get the result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- amitchandakSuper User
jimmymartin , the best is to create a common dimension
refer to my blog on the same topic https://medium.com/@amitchandak/power-bi-when-i-asked-you-to-create-common-tables-a-quick-dax-solution-8e3eccb41bda
- v-yanjiang-msftCommunity Support
Hi jimmymartin ,
According to your description, in my understanding, there're two tables in your sample,
Team table:
Opposition table:
Then create a measure to extrat the tackles of the opposition team, if this is the case, here's my solution, use the lookupvalue-function to create a measure.
Opposition Tackles = LOOKUPVALUE ( Opposition[Tackles], 'Opposition'[Oppositon], MAX ( 'Team'[Team] ) )Get the result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.