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

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.

Reply
_Aleksa_
Helper II
Helper II

SelectedValue Function Error

Hi,

 

I am getting an erro message when trying to use the following statement:

 

Ind = SELECTEDVALUE(
RIGHT('Weekly Data'[Pmt_Instruction_Cde],1)="2" && 'Weekly Data'[Days from Report Date] >=0 && 'Weekly Data'[Days from Report Date] <31,"All States Overdue",
RIGHT('Weekly Data'[Pmt_Instruction_Cde],1)="2" && 'Weekly Data'[State]="CA" && 'Weekly Data'[Days from Report Date] >=90,"CA Overdue",
RIGHT('Weekly Data'[Pmt_Instruction_Cde],1)="2" && 'Weekly Data'[State]="OR" && 'Weekly Data'[Days from Report Date] >=60,"OR Overdue",
""
)

 

Thank you!!!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@_Aleksa_ , this should be like this , I do not see role of selected value there

Ind = Switch( True()
RIGHT('Weekly Data'[Pmt_Instruction_Cde],1)="2" && 'Weekly Data'[Days from Report Date] >=0 && 'Weekly Data'[Days from Report Date] <31,"All States Overdue",
RIGHT('Weekly Data'[Pmt_Instruction_Cde],1)="2" && 'Weekly Data'[State]="CA" && 'Weekly Data'[Days from Report Date] >=90,"CA Overdue",
RIGHT('Weekly Data'[Pmt_Instruction_Cde],1)="2" && 'Weekly Data'[State]="OR" && 'Weekly Data'[Days from Report Date] >=60,"OR Overdue",
""
)

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@_Aleksa_ , this should be like this , I do not see role of selected value there

Ind = Switch( True()
RIGHT('Weekly Data'[Pmt_Instruction_Cde],1)="2" && 'Weekly Data'[Days from Report Date] >=0 && 'Weekly Data'[Days from Report Date] <31,"All States Overdue",
RIGHT('Weekly Data'[Pmt_Instruction_Cde],1)="2" && 'Weekly Data'[State]="CA" && 'Weekly Data'[Days from Report Date] >=90,"CA Overdue",
RIGHT('Weekly Data'[Pmt_Instruction_Cde],1)="2" && 'Weekly Data'[State]="OR" && 'Weekly Data'[Days from Report Date] >=60,"OR Overdue",
""
)
HotChilli
Super User
Super User

That looks like a SWITCH statement.  What is the code supposed to be doing?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.