Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need help in comparing two variables and use it in a table.
My table consists of multiple columns, consider for example column1 shows the result of variable expression Var1 and similarly column2 shows the result of variable expression Var2.
In column3 I want to compare if Var1 is greater than Var2 and display the result.
Below are the definition for Var1 and Var2. variables are not defined in the script but in the chart.
Var1=if(IsNull([Actual Hours]),if( [Commodity] = 'Dry', 72, 192),[Actual Hours])
Var2=if (isnull([Event Date_Time]),'InTransit',if(isnull((Interval([Event Date_Time]-[Pickup_Date],'HH'))),(Interval([Event Date_Time]-[Received_Date],'HH')),(Interval([Event Date_Time]-[Pickup_Date],'HH'))))
Both Var1 and Var2 will have hours as the result.
Hi, have you tried just compare your expressions
If( if(IsNull([Actual Hours]),if( [Commodity] = 'Dry', 72, 192),[Actual Hours]) >
if (isnull([Event Date_Time]),'InTransit',if(isnull((Interval([Event Date_Time]-[Pickup_Date],'HH'))),(Interval([Event Date_Time]-[Received_Date],'HH')),(Interval([Event Date_Time]-[Pickup_Date],'HH')))) ,
if(IsNull([Actual Hours]),if( [Commodity] = 'Dry', 72, 192),[Actual Hours]) )
or maybe like this: