Forum Discussion

snph1777's avatar
snph1777
Icon for Helper V rankHelper V
5 years ago
Solved

Power BI DAX : CROSS JOIN between two tables based on a variable filter

I have two input tables in my Power BI model.   1) UserPermission 2) Lookup Table   The above two tables are not related.   UserPermission:     'All' corresponds to all the segments i...
  • snph1777's avatar
    5 years ago

    Finally figured out: I had to change the column name UserPermissions[SegmentID] to UserPermissions[SgmtID]

     

    Then:

     

    Output Table = FILTER (                         
                                            SUMMARIZECOLUMNS (
                                                                                     UserPermission[UserName],
                                                                                     UserPermission[SgmtID],
                                                                                     LookupTable[Ports],
                                                                                     LookupTable[SegmentID]
                                                                                   ),
                                           [SgmtID] < 0 || [SegmentID] = [SgmtID]
                                         )