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.
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?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |