Hello @jnorah, due to your requirements for the RLS permissions, I don’t think you can really manage the dataset any differently. Unless you were able to add a contract type grouping field into the dataset to merge multiple contract ids into a single contract type field, it is going to repeat the rows. Alternatively, you could maybe configure a wider dataset by including multiple contract type columns. How many contract types could there be for a single contract?
Another idea would be to manage the duplicates within QuickSight. Utilizing something like a denseRank function and applying it as a filter onto your visuals could allow for the RLS functionality to stay the same without impacting the visuals and aggregations.
Rank Filter = denseRank([{contract_type_id} ASC], [{contract_id}], PRE_AGG)
If you apply this calculated field as a custom filter on your visuals, set the value 1 in the text field, and exclude NULLs in the dropdown, you should be able to ensure you only return 1 row per contract_type. Also, since this is PRE_AGG, if you need the user to be able to filter on contract types, it will display the one they have selected.
Let me know what option you prefer and I can answer any lingering questions you have. Thank you!