Forum Discussion

manoj619's avatar
manoj619
Regular Visitor
1 year ago
Solved

Dax

In power bi i have shrepoint list Table a with two columns one column which will be used as drop-down visual(lookup values) and another column data which will be compared to table b column need to re...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi manoj619 ,
    Thank you pankajnamekar25  for the prompt response!

    The measure cannot return a table. Since you want a table format, you may use a table visual with a measure to filter missing brands dynamically. Please follow these steps:

    • Add Table B in a table visual, then create a measure using below :

       

      ShowMissingBrands =
      VAR SelectedCountry = SELECTEDVALUE('Table A'[Country])

      VAR BrandsInTableA =
          CALCULATETABLE(
              VALUES('Table A'[Car]),
              'Table A'[Country] = SelectedCountry
          )

      VAR MissingBrands =
          EXCEPT( VALUES('Table B'[Brand]), BrandsInTableA )

      RETURN
          IF( SELECTEDVALUE('Table B'[Brand]) IN MissingBrands, 1, 0 )
    • Apply a visual filter on ShowMissingBrands where value = 1.This will dynamically display missing brands based on the selected country in the slicer.

       

    This approach will give the expected output dynamically.For clear understanding ,refer the attached file.

    Hope this helps.If so,consider accepting it as a solution.

    Thank you for being a valued member in Microdoft Fabric Community Forum!

    Regards,
    Pallavi.