cancel
Showing results for 
Search instead for 
Did you mean: 

SAC Story : Recent n Dates calculation

krishnkant
Explorer
0 Kudos

Hi Team,

I am working on a SAC Story(Optimized Design) based on a Datasphere live model*.

There is a measure named, Inventory Date*. My requirement is to display the latest/recent 10 dates from the Inventory date in the SAC table.

SAC Table Column would contain the latest 10 Inventory dates and Table row will have one measure value in row section of the table

Note:Extra Information

1.Inventory Date only displays the Monday's date . For example, for any of the dates among 7th ,8th,9th,10th May 2024, Inventory date would be 6th of may(i.e Monday).I have already created calculation to display only the Monday's date.

2.We are using a live model, so number of entries in Inventory date column may vary. We need the most recent 10 dates.

Please help me to achieve this calculation.

Regards,

Krishn Kant

View Entire Topic
tylerrose
Explorer
0 Kudos

Is Inventory Date a measure or dimension?

If measure - I recommend converting to Date type dimension in Datasphere.

If dimension - I see a few options to get you there.

  1. First and most straight forward - Restricted measure on 'Current Date Input Control'. Here are a few articles to help out: <https://community.sap.com/t5/technology-q-a/sap-analytics-cloud-how-to-get-data-from-current-date-1/...  <https://help.sap.com/docs/SAP_ANALYTICS_CLOUD/00f68c2e08b941f081002fd3691d86a7/e1940498b0f3482892916...>
  2. Alternatively, you could restrict the data using an input parameter in Datasphere. Here are a few articles to help out:  <https://community.sap.com/t5/technology-q-a/dinamyc-date-in-datasphere-fact-view-input-parameter/qaq...> <https://help.sap.com/docs/SAP_DATASPHERE/c8a54ee704e94e15926551293243fd1d/cdd8fa0fd74b495584dca34343...>