Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
MiraAbel
Frequent Visitor

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, Currency etc.  in rows, just like a reference info. 

Will you please suggest? 

Thank you

Mira

1 ACCEPTED SOLUTION

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

vcgaomsft_0-1714361021514.png

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

View solution in original post

4 REPLIES 4
MiraAbel
Frequent Visitor

Hello
Thank you for your attention! Much appreciated
Currently I have a card that shows information re a selected company code with a measure like below. 

 

@ 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])
 &
 " , Company Name: "& SELECTEDVALUE(DIM_Companies[Company Name])
&                           
 ", Local Currency: "& SELECTEDVALUE(DIM_Companies[Rep Local Currency])
 &
 " , Business Line: "& SELECTEDVALUE(DIM_Companies[&_Business Line])
)
            
RETURN
InfoToShow

 

 

 

 

However, I would like it to be in the table format shown below, so that when I select a company I know what it is... etc

Company ID3071
Company NameSalmon and Cod Co Ltd
Rep Local CurrencyEUR
&_Business LineLine Fishing



Many thanks
Mira 

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

vcgaomsft_0-1714361021514.png

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

Thank you - it helps. Accepted.

AnalyticsWizard
Super User
Super User

Can you ovide more details on a desired output?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.