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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
RSMIT221
Regular Visitor

Switch logic not pulling in column from another table

Hello, 

 

I am trying to adjust my Switch statemnt so that I do not have to tediously input vlaues when I have to update the dashboard. Above line "3" is my old logic. Line "5 " begins my new logic, where I am trying to say if the code = 1003, and the LOS O/E is < [P95] (which is coming from another table) then return "P95". 

RSMIT221_0-1683044693293.png

 

Here is the [P95] column

RSMIT221_1-1683044990917.png

 

The error I get says "A single value for column "P95" cannot be determind. 

 

The relationbetween the tables are many to many (*:*) and being cross filtered in both directions. 

2 REPLIES 2
tamerj1
Super User
Super User

Hi @RSMIT221 

1. You creating a calculated column in a table and referencing another column in another table without aggregation which not allowed. If you need to access the row level of another table you need to iterate that table using FILTER or X-Aggregators or any iteration function. 
2. Referencing measures in the formula of a calculated column is not a good practice. 

eliasayyy
Super User
Super User

I think you have an error in your code

 

Try in the end [Viz Q and A ref code] =1003 && [LOS O/E] <=('Los Baseline and percentile rank'[P95]), "95")

As you see you missed a bracket

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

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