Forum Discussion

FelipeDelamar's avatar
FelipeDelamar
Frequent Visitor
6 years ago

Calculated Column Measure that summarize a table (Table related to a virtual table)

Hello,

 

I have two tables:

SystemDocs

DownloadedDoc

 

SystemDocs Table
Project nºDocumentDocument Revision
A-168-F168F-100-ktp-003A
A-101-F101F-120-ktp-005B
A-099-F099F-530-ktp-001D
A-099-F099F-230-ktp-001C
A-099-F099F-110-ktp-005D
A-101-F101F-900-ktp-001B

 

DownloadedDoc Table
Project nºDocumentProject Revision
A-168-F168F-100-ktp-003E
A-101-F101F-120-ktp-005F
A-099-F099F-530-ktp-001A
A-099-F099F-110-ktp-005A
A-099-F099F-230-ktp-001A
A-101-F101F-800-ktp-015F

 

They are linked by the column "Document" because it has unique values.

I want to get the "project revision" and put it as a new column in the SystemDocs table.

 

I don't want to solve it by creating a real dimention table. Want to solve this problem only with virtual tables in a calculated column).

 

I was trying to use summarize to get distinct projects from DownloadedDoc table but I don't know how I use related in a virtual table and apply in each line (calculated column).

 

(edit: the Document Column sometimes is different in downloadedDoc Table then SystemDocs Table, so the connection must be between project nº column)

 

Thank you!

 

 

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi

     

    You can try the following if you have 1-1 between the SystemDocs and DownloadedDoc

    Project Revision = RELATED (‘DownloadedDoc’ [Project Revision])

     

    see more information on RELATED and RELATEDTABLE Functions

    thank you

     

    If I answer your question, please mark my post as a solution, this will also help others.
    Please give Kudos for support.

    Tomas Santandreu Polanco |Principal Business Intelligence Consultant
    www.designmind.com

    • FelipeDelamar's avatar
      FelipeDelamar
      Frequent Visitor

      In my real table what happend is sometimes it don't has the same document in the DownloadedDoc table but it has the project number. As both tables have the relation *-* in the project nº column I need to agregate the downloadedDoc table, maybe with summarize with related, but I don't know how I m gonna do that.

       

      I will edit the post to reflect this case, thank you Anonymous