Forum Discussion
ercwebdev
5 years agoFrequent Visitor
How to display info from another table?
Hi all, I'm really not sure what structure of DAX to use for this problem. I have 2 tables, one with the Projects and another table with all of the risks for the projects, so it is a one to many rel...
ercwebdev
5 years agoFrequent Visitor
Hi,
Ok, have made a quick mockup and zipped (.pbix and Excel) if you want to download and try having a play:
https://1drv.ms/u/s!AtRktPvcDTo7dbfRYaTFut2IjhQ?e=NUDcJo
Many thanks,
A
ercwebdev
5 years agoFrequent Visitor
I've done some work on this and managed to get something that will suffice and do the job. Thought I would share it with the community.
Created a new Table with the following:
MyRedRiskTbl =
FILTER(
Risks,
Risks[RiskColour]="Red"
)This brings the Projects in that have a red. It seems to do a Distinct and doesn't duplicate them.
Then added a new column in the Project Data to look up and check if there is a corresponding value in the virtual table:
RedRiskCheckTwo =
LOOKUPVALUE(
MyRedRiskTbl[RiskColour],----- Result Column Name
MyRedRiskTbl[Project ID],--- Search column
'Project Data'[Project ID] ----- Search Value
, Blank()--- Not Match with condition returns Blank
)
This will then either insert 'Red' or leave it blank. I can then do some color formatting based on this.
Here is how it looks:
Thanks,
Alan