Summary
Data set in Data Model which doesnt work
Content
Hello,
I'm working on an RTF template on which I want to display certain information of a table called "shipment_stop_debrief". Fyi I didn't create this data model from the start, i'm new at this.
I created another Data set with this content:
SELECT ITEM_PACKAGE_COUNT FROM
(
select t.*, row_number() over (partition by s_ship_unit_gid ORDER BY INSERT_DATE DESC) rn
FROM shipment_stop_debrief t) ITEM_PACKAGE_COUNT_DEBRIEF
where rn = 1
I linked this data set to another one via the SHIPMENT_GID field a follows:

I must be doing something wrong as when I run the report it says it isn’t valid and when I deleted this data set it works just fine. Of course I added the ITEM_PACKAGE_COUNT_DEBRIEF (which is the alias for the field in my new data set) in my template :

Do you have an idea from where the problem could be coming from ?