Forum Discussion

GLIDO's avatar
GLIDO
Helper I
8 years ago
Solved

RELATED function not working

Hi Community People,    I have three tables the relation among them is                                          where TENANT.ID=LOAN_APPLICATION.TENANT_ID and             ...
  • v-frfei-msft's avatar
    8 years ago

    Hi GLIDO,

     

    As the picture you shared, actually there is no relationship between Login Acceptance Date and TENANT. So you cannot use the RELATED function here. Based on my test, we can take the following steps to meet your requirement.

     

    1. Create a new column in LOAN_APPLICATION table.

    Login date = RELATED('Login Acceptance Date'[Login date])


    2. Create a new measure.

     

    Measure 2 = CALCULATE(COUNT(LOAN_APPLICATION[ID]),FILTER(LOAN_APPLICATION,LOAN_APPLICATION[date_of_receipt]<RELATED(TENANT[Start Date])),FILTER(LOAN_APPLICATION,LOAN_APPLICATION[Login date]<RELATED(TENANT[Start Date])))

     

    3. Then we can get the result as below.

     

    For more details, please check the pbix as attached.

     

    https://www.dropbox.com/s/g4rjig9r5zbb1mo/RELATED3.pbix?dl=0

     

    Regards,
    Frank