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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

How to show a value in a table column on a card visual, base on another column value

Hi All,

I am new to Power BI and appreciate if someone can help to reolve the below pls?

I have a table in the Data model as below

unitMainCompanyBranchCompanyColumn 12Column 13...
124.500.00..........
0016.70...........
008.71............
117.850.00...........
........................

 

I have above table on PowerBI desktop data model and there is a slicer set, which select a single row at a time.

"Unit" column is set as integer and which has values of either 1 or 0

"MainCompany" and "BranchCompany" are set as 'Text' type in the backend table, and no calculation is required what I want to just show the values in the columns:

>>>>>>>>>>>>

I want to have a 'Card' on visualisation, based on following criteria:

If unit = 1, then select "MainCompany" value

                  Else  select "BranchCompany" value

 

>>>>>>>>>>

Appreciate your advice pls?

Thanks.

Prabath

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

@Anonymous 

Give this measure a try.

Card Measure = 
VAR _Unit = SELECTEDVALUE ( 'Table'[unit] )
RETURN
SWITCH (
    _Unit,
    1,SELECTEDVALUE('Table'[MainCompany]),
    0,SELECTEDVALUE('Table'[BranchCompany]),
    ""
)

jdbuchanan71_0-1656857956708.png

 

View solution in original post

3 REPLIES 3
jdbuchanan71
Super User
Super User

@Anonymous 

Give this measure a try.

Card Measure = 
VAR _Unit = SELECTEDVALUE ( 'Table'[unit] )
RETURN
SWITCH (
    _Unit,
    1,SELECTEDVALUE('Table'[MainCompany]),
    0,SELECTEDVALUE('Table'[BranchCompany]),
    ""
)

jdbuchanan71_0-1656857956708.png

 

Hi and good morning jdbuchanan71, what about if i want to do it based on the column? which is if i click MainCompany it will display the value. and if click branchcompany, it will display other value. Thank you!

Anonymous
Not applicable

Hi jdbuchanan,

Thank you very much for your answer, it woked well.

regards,

Prabath

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors