Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
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
| unit | MainCompany | BranchCompany | Column 12 | Column 13... |
| 1 | 24.50 | 0.00 | ..... | ..... |
| 0 | 0 | 16.70 | ...... | ..... |
| 0 | 0 | 8.71 | ...... | ...... |
| 1 | 17.85 | 0.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
Solved! Go to Solution.
@Anonymous
Give this measure a try.
Card Measure =
VAR _Unit = SELECTEDVALUE ( 'Table'[unit] )
RETURN
SWITCH (
_Unit,
1,SELECTEDVALUE('Table'[MainCompany]),
0,SELECTEDVALUE('Table'[BranchCompany]),
""
)
@Anonymous
Give this measure a try.
Card Measure =
VAR _Unit = SELECTEDVALUE ( 'Table'[unit] )
RETURN
SWITCH (
_Unit,
1,SELECTEDVALUE('Table'[MainCompany]),
0,SELECTEDVALUE('Table'[BranchCompany]),
""
)
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!
Hi jdbuchanan,
Thank you very much for your answer, it woked well.
regards,
Prabath
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.