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! Request now
Hello.
I am trying to use Switch True that would return a specific value is a particular customer has a certain combination of values (from the same column). However, a customer can have more than one row of data--meaning one value being on one row, and the other value on another row. I want to be able to determine whether or not each customer has the specified Code values from that column (though each Code value is on a different row for the same customer), and then return the appropriate resulting "Code Combination" value.
When I try the above approach with my actual data table, the new "Code Combination" column returns blanks. Any assistance is greatly appreciated.
For example:
Customer ID Code
01737298 WBSA
01737298 WMSA
01568489 WBSM
Code Combination =
SWITCH(
TRUE(),
'Table'[Code] = "WBSA" && 'Table[Code] = "WMSA", "BS to MS")
Hi @daviss62
Not sure if you'd like to get below result:
Measure 2 = var a = CALCULATE(MAX('Table (3)'[Customer ID]),FILTER('Table (3)',[Code]="WBSA"))
var b = CALCULATE(MAX('Table (3)'[Customer ID]),FILTER('Table (3)',[Code]="WMSA"))
Return
IF(a=b,BLANK(),"BS to MS")
Hi @v-diye-msft ,
That is close to what I want. However, when I plug in my columns/fields into a new calculated column, I get the following "circular dependency" error message.
Hi @daviss62
I am aware of a circular dependency "issue" when you write multiple calc columns, and their incrementally refer to all columns in a table. Did you use calculated com which should be measure instead?
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 97 | |
| 70 | |
| 50 | |
| 42 | |
| 40 |