Forum Discussion

MiraAbel's avatar
MiraAbel
Frequent Visitor
2 years ago
Solved

Visual to show info from a dimension table

Dear Power BI community I have a list of company codes, when I select a certain company code, I would like a visual which will show from a dimension table some attributes, e.g. Country, Region, Cu...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi MiraAbel ,

    Please try this:

    @ Company Info = 
    VAR NumberOfCompaniesSelected =
        DISTINCTCOUNT ( DIM_Companies[Company ID] )
    VAR InfoToShow =
        IF (
            NumberOfCompaniesSelected > 1,
            "a range of selected entities selected",
            "Company Code: " & VALUES ( DIM_Companies[Company ID] ) & UNICHAR(10)
                & "Company Name: " & SELECTEDVALUE ( DIM_Companies[Company Name] ) & SELECTEDVALUE ( DIM_Companies[Company Name] ) & UNICHAR(10)
                 & "Local Currency: " & SELECTEDVALUE ( DIM_Companies[Rep Local Currency] ) & UNICHAR(10)
                & "Business Line: " & SELECTEDVALUE ( DIM_Companies[&_Business Line] )
                
        )
    RETURN

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group