I am trying to write a switch function in power fx in Dataverse that will calculate interest due by state where each state has a different interest rate. Currently I have:
Switch('State', "PA", (('Orig Judgment Amount' * 0.06) * 'DaysJudgment') / 365, "NY", (('Orig Judgment Amount' * 0.09) * 'DaysJudgment') / 365, "NJ", (('Orig Judgment Amount' * 2.25) * 'DaysJudgment') / 365)
But I am receiving the error ""The function 'Switch' has some invalid arguments." with no further explanation. Any ideas on how to make this work?
That seems to be more of a "If , Then, Else" function and not a Switch function. I need a different result by each state according to the calculation of interest by each state's interest rate. A mere default value after the initial calculation is exactly the opposite of a Switch function..
I have tried to replicate the same as below
Switch('Address 1: State/Province',"NSW",(('Original Judgment Amount' * 0.06) * DaysInJudgment) / 365,'Original Judgment Amount')
The only difference as that I have added the last parameter as the default.
Assumptions:
-State is single line of text
- Original Judgement amount is currency
- Days in Judgement is number
stampcoin
17
mmbr1606
13
Super User 2025 Season 1
ankit_singhal
11
Super User 2025 Season 1