Forum Discussion

NithinBN's avatar
NithinBN
Helper II
3 years ago

DAX measure for multiple Table

Hello All, 

 

I have a 3 Table, 

Table1                        Table 2 

Table 3

and its relation is like this: 

T1 (ID)<-->T2(ID)

T2(Ref)<-->T3(ID)

How can i get 

1)Count of T1, having a refresence in T3 of Type:B

2)Count of T1 without link to T3

 

 

3 Replies


  • 1) 

    Measure =
    CALCULATE(count(t1[ID]),FILTER(t3,t3[Column1]="b"))
    2) 
    Measure =
    VAR _tab = SUMMARIZE(t1,t1[ID],"flag",IF ( t1[ID] IN DISTINCT (t3[ID]), 0, 1 ))
    RETURN sumx(_tab,[flag])
    • NithinBN's avatar
      NithinBN
      Helper II

      Measure 2 returns values as 6, but it should show 2, Only 4 and 6 doesnot have link to T3

       

      • andhiii079845's avatar
        andhiii079845
        Solution Sage

        My model has the relations via the ID fields. Now I see you us REF for table t2, t3. Than i have to mix it