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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Solution Supplier
Solution Supplier

Can you ovide more details on a desired output?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.