COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: m.sahar on 19 Oct 2016 02:01:23 AM

Title: error: convert null to set type, tuple type
Post by: m.sahar on 19 Oct 2016 02:01:23 AM
Hi everyone
I'm new to cognos and I have a problem in report studio

I wrote a mdx query for computing last nonempty value for a measure:
tuple(

ITEM(

tail(

FILTER(

[FACTACCINMONTH_94_Q3].[DIMDATE].[CALENDAR].[MONTH]
,
[Balanceinend]>0
)
,1),0)

,
[Balanceinend]
)
When I use it as a sigletone it works fine.but when I use it in a query calculation in a list(with year and month).it causes following error:
   XQE error encountered: Unable to convert null to set type, tuple type

Could anybody help me out of this.
Tip:when I put the last month with data(january) in above script it runs without error
tuple(

[January]

,
[Balanceinend]
)





Title: Re: error: convert null to set type, tuple type
Post by: mrcool on 05 Apr 2017 08:48:26 PM
Hi Sahar,

Did you manage to find a solution for this problem?

I am facing the same issue with my tuple calculation. we have null member in the dimensions which is causing the problem.

Can someone advise on handling nulls in dimensions?

Thanks,
Mc
Title: Re: error: convert null to set type, tuple type
Post by: New_Guy on 06 Apr 2017 01:40:20 PM

Hi,
Are you looking to get one month or multiple months. The tail function gets you the last month of the month level and item gets you one member.
Post an excel output with sample data.

Good luck
New guy.
Title: Re: error: convert null to set type, tuple type
Post by: mrcool on 06 Apr 2017 10:41:20 PM
we are looking for only 1 month and that to the last month. Tuple doesn't work with tail, hence we used item to convert it as a member. The issue is clearly with the item function as the calculation works with hard coded member.
There is also an APAR on IBM with similar issue.