Filter Data Issue

Hi,

 

I have one data set which i am trying to filter on basis of some status. If status of any records in "HELLO" then i am picking date of that records and filtering out that date from union of dates by using difference() function. But this trick is not working in case of single row data.

Kindly check where i am doing wrong in this.

 

local!date1: union(
ri!dataset[wherecontains(
{
"HELLO"
}, ri!dataset.status
)].date,
ri!dataset[wherecontains(
{
"HELLO"
}, ri!dataset.status
)].date
),
local!date2: union(
ri!dataset.date,
ri!dataset.date
),
local!filterdate2: difference(
local!date2,
local!date1
),

  Discussion posts and replies are publicly visible