cancel
Showing results for 
Search instead for 
Did you mean: 

SAC line charts

kocomandi
Explorer
0 Kudos

Hi SAP community

I am trying to create a chart in SAC that shows the headcount trend for 2023 Actuals, 2023 Budget, and 2022 Actuals.
I have tried different solutions but it appears I cant get it right.

I have created three calculated measures, one for each trend. My dimension is Date. However, I am not able to get the 2022 data in there.
I also tried to add cross calculations to the chart but still not able go get all trend lines in ne chart.

Please let me know if anyone has a suggestion on how to do this.

Thanks

kocomandi
Explorer
0 Kudos

I want to mentions that all these trend lines should appear above each other and not side by side.

Accepted Solutions (0)

Answers (2)

Answers (2)

N1kh1l
Active Contributor

kocomandi

You are right I just did not see that the month order was not right. By default SAC arranges those months in Alphabetical order but you can change the sort order as shown below.

Output:

Hope this helps.

Please upvote/accept if this helps.

Nikhil

N1kh1l
Active Contributor
0 Kudos

kocomandi

Great. Kindly close the thread by accepting the answer.

Nikhil

kocomandi
Explorer
0 Kudos

This is the final chart.

When I export is to Pdf or ppt. the line above the months circled in blue, disappears. Do you know any solution for that?

N1kh1l
Active Contributor
0 Kudos

kocomandi

Not sure of that. Try formatting the axis color . I exported it and found no issues.

N1kh1l
Active Contributor
0 Kudos

kocomandi

Please close the thread by accepting the answer as shown below.

Nikhil

N1kh1l
Active Contributor

kocomandi

Ok you did not show a sample of the chart but I am assuming you want to visualize these 3 measures over date dimension in a line chart. Now I am assuming you can only visualize these measure over a common date parameter like Quarters or months because if you do it over years than 2019 Actuals is something which is in 2019 and cannot be available in 2020. 2020 Actual and Budget makes sense as they both are in same year. Something like below.

If the above is what you want, First create a calculated dimension with below formula. Change the name of date dimension as per your model.

IF(RIGHT([d/"SAP_CEP_SALES_PLANNING":CALMONTH].[p/CALQUARTER],
        1)="1",
        'Q1',
        IF(RIGHT([d/"SAP_CEP_SALES_PLANNING":CALMONTH].[p/CALQUARTER],
                1)="2",
                'Q2',
                IF(RIGHT([d/"SAP_CEP_SALES_PLANNING":CALMONTH].[p/CALQUARTER],
                        1)="3",
                        'Q3',
                        'Q4')))<br>

Then create 3 restricted measures one for 2019 Actuals, 2020 Actuals and 2020 Budget (replace years 2023)

Chart configuration:

If you want to analyze over months, then create another calculated dimension called Months with below formula.

[d/"SAP_CEP_SALES_PLANNING":CALMONTH].[p/MONTHDESC]

Output:

Hope this helps !!

Please accept and upvote if this helps you.

Nikhil

kocomandi
Explorer
0 Kudos

Hi

Thank you so much for the explanation. It perfectly works with Quarters. However, when I change the formula to Months, then the chart is not correct. Even in your example, February comes before January and August comes before July and September.
The monthly order is not correct.

kocomandi
Explorer
0 Kudos

I actually resolved the order of month. Clicked (...) at the top-right of the chart/sort/month.

Thanks again for you extremely helpful tips

N1kh1l
Active Contributor
0 Kudos

kocomandi

Please accept the answer if you found it helpful and close the thread.

Nikhil