If you are unable to create a new account, please email support@bspsoftware.com

 

XQE-PLN-0264 The argument at position 1 of the function 'tuple' is invalid

Started by oscarca, 12 Jul 2018 02:55:35 AM

Previous topic - Next topic

oscarca

Hey Cognoise community,

I am getting this error:"XQE-PLN-0264 The argument at position 1 of the function 'tuple' is invalid in data item 'Volumes Current+Last Month' of query 'Data_ForQrd_Data.8', expected one of the following types: 'member, measure'."
when trying to use tuple in a data item.

This is the code for the data item "Volumes Current+Last Month":
if (tuple([Actual NW];[Current Month]) = NULL) then (0) else (tuple([Actual NW];[Current Month]))
+
if (tuple([AC NW];[YTD Current Month]) = NULL) then (0) else (tuple([Actual NW];[YTD Current Month]))
+
if (tuple([Budget NW];[Current Month]) = NULL) then (0) else (tuple([Budget NW];[Current Month]))
+
if (tuple([BU NW];[YTD Current Month]) = NULL) then (0) else (tuple([BU NW];[YTD Current Month])) 
+
if (tuple([Actual NW];[Last Month]) = NULL) then (0) else (tuple([Actual NW];[Last Month]))
+
if (tuple([Actual NW];[YTD Last Month]) = NULL) then (0) else (tuple([Actual NW];[YTD Last Month]))
+
if (tuple([Budget NW];[Last Month]) = NULL) then (0) else (tuple([Budget NW];[Last Month]))
+
if (tuple([Budget NW];[YTD Last Month]) = NULL) then (0) else (tuple([Budget NW];[YTD Last Month]))

the Data item Budget NW and Actual NW looks like this:
tuple([Actual];[Quantity Net Weight])
and
tuple([Budget];[Quantity Net Weight]).

Actual and Budget comes from a dimension called version
[CBI Sales].[Version].[Version].[Version]->:[M16].[[Version]].[Version]].&[Actual]]]
and
[CBI Sales].[Version].[Version].[Version]->:[M16].[[Version]].[Version]].&[Budget]]]

anyone know how to solve this error?
Thank you in advanced for taking your time!

MFGF

Quote from: oscarca on 12 Jul 2018 02:55:35 AM
Hey Cognoise community,

I am getting this error:"XQE-PLN-0264 The argument at position 1 of the function 'tuple' is invalid in data item 'Volumes Current+Last Month' of query 'Data_ForQrd_Data.8', expected one of the following types: 'member, measure'."
when trying to use tuple in a data item.

This is the code for the data item "Volumes Current+Last Month":
if (tuple([Actual NW];[Current Month]) = NULL) then (0) else (tuple([Actual NW];[Current Month]))
+
if (tuple([AC NW];[YTD Current Month]) = NULL) then (0) else (tuple([Actual NW];[YTD Current Month]))
+
if (tuple([Budget NW];[Current Month]) = NULL) then (0) else (tuple([Budget NW];[Current Month]))
+
if (tuple([BU NW];[YTD Current Month]) = NULL) then (0) else (tuple([BU NW];[YTD Current Month])) 
+
if (tuple([Actual NW];[Last Month]) = NULL) then (0) else (tuple([Actual NW];[Last Month]))
+
if (tuple([Actual NW];[YTD Last Month]) = NULL) then (0) else (tuple([Actual NW];[YTD Last Month]))
+
if (tuple([Budget NW];[Last Month]) = NULL) then (0) else (tuple([Budget NW];[Last Month]))
+
if (tuple([Budget NW];[YTD Last Month]) = NULL) then (0) else (tuple([Budget NW];[YTD Last Month]))

the Data item Budget NW and Actual NW looks like this:
tuple([Actual];[Quantity Net Weight])
and
tuple([Budget];[Quantity Net Weight]).

Actual and Budget comes from a dimension called version
[CBI Sales].[Version].[Version].[Version]->:[M16].[[Version]].[Version]].&[Actual]]]
and
[CBI Sales].[Version].[Version].[Version]->:[M16].[[Version]].[Version]].&[Budget]]]

anyone know how to solve this error?
Thank you in advanced for taking your time!

Hi,

A Tuple function will accept only members or measures as its arguments, and will return a value. Your issue here is that you are using the results of one tuple (Budget NW or Actual NW) as an argument in the tuple expressions. As the results of your first tuple is a value not a member, this is triggering the error you are seeing.

The easiest thing to do is to replace [Budget NW] and [Actual NW] with the two items from your original tuples  - eg rather than tuple([Actual NW];[YTD Last Month]) use tuple([Actual];[Quantity Net Weight];[YTD Last Month])

Cheers!

MF.
Meep!

oscarca

Thank you so much MFGF, it solved it.

tried the same logic for:
tuple([Actual];[Quantity Net Weight])/tuple([Actual];[Quantity Net Weight];[Summary(Brands)]) but didnt work here unfortunately.. I had the same problem for this data item.

it looked like this before:
[AC NW]/tuple ([AC NW]; [Summary(Item Brands)])

Summary(Brands) looks like this:
aggregate(currentMeasure within detail [Brand])

oscarca

I changed the summary expression to:
member(aggregate(currentMeasure within set [Item Type]))
and it seems to work now.