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

Set Expression - Subtraction using variable

Hi All,

I have below expression which is not giving me proper output.  Here I ma selecting value based on the variable & Installed dimension value & displaying Status.

FirstSortedValue({< Total = {"<=  $(Varible) - [Installed] "} >}[Upgrade Status,-[PathID])

Flow is -

Varibale value will be set from input box  Variable = 20

Value for Installed = 15

So if everything works as expected and will get out put but I am not getting an expected output.

FirstSortedValue({< Total = {"<=  6 "} >}[Upgrade Status,-[PathID])

f i hard code value  as 6 then i am getting output. is anyone able to help in this.

1 Solution

Accepted Solutions
sunny_talwar

Or this

FirstSortedValue({<Total = {"<=$(=$(Varible) - [Installed])"}>} [Upgrade Status,-[PathID])

View solution in original post

5 Replies
vishsaggi
Champion III
Champion III

try this

= FirstSortedValue({< [Upgrade Status] = {"$(= Total <= ((vVariable) - [Installed])) "} >} [Upgrade Status], -[PathID])

ashishbhuyekar
Contributor III
Contributor III
Author

Vishwarath - This is not giving an expected result.

qliksus
Specialist II
Specialist II

Does the field Installed has more than one value?  . why don't you try with some aggregation function like the below

FirstSortedValue({< Total = {"<=  $(Varible) - max([Installed]) "} >}[Upgrade Status,-[PathID])

tamilarasu
Champion
Champion

Hi Ashish,

Try,

FirstSortedValue({< Total = {"<= $(=Varible - [Installed])"} >}[Upgrade Status,-[PathID])

sunny_talwar

Or this

FirstSortedValue({<Total = {"<=$(=$(Varible) - [Installed])"}>} [Upgrade Status,-[PathID])