Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Extracting information from second table using ID (dataset data model so measures only?)

Hi there,   Bit of a complicated one and as I'm not too experienced with working with PowerBI datasets, I am a little stumped on how to proceed due to the limitations.   What I have currently are...
  • johnt75's avatar
    4 years ago

    If the entries in the Issues table are unique, i.e. it would have been a one-to-many relationship, then you can create a measure like

    Created date measure = CALCULATE( SELECTEDVALUE(Issue[Created Date]), 
        TREATAS( { SELECTEDVALUE('Issue Attributes'[Issue_ID]) },Issue[Issue_ID] )
    )

    and put that into a visualisation with details from the Issue Attributes table

  • goncalogeraldes's avatar
    4 years ago

    Hello there Anonymous ! Try using the TREATAS() function to apply filtering contextbetween two unrelated tables. Dont forget to use the VALUES() function the "many" side of the relationship. Something like:

    Measure =
    CALCULATE(
    SELECTEDVALUE(Issue[Created Date]), 
    TREATAS( VALUES(Issue[Issue_ID]) , 'Issue Attributes'[Issue_ID])
    )

    Hope this answer solves your problem!
    If you need any additional help please @ me in your reply.
    If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
    Thanks!

    You can also check out my LinkedIn!

    Best regards,
    Gonçalo Geraldes