cancel
Showing results for 
Search instead for 
Did you mean: 

Calculate Totals manually in SAP Analytics Cloud

Sumalini
Participant
253

Hi All,

Can you please suggest me on how to calculate the below Total_Count value using script. 

Once i get the total_count value, i have to calculate the  % values for each code. So what is the % of incidents for that code with total incidents.Hence i cannot use Show Totals option for that Dimension.

Thanks in advance.

 

 Dimension2Code XCode YCode Z 
 MeasuresCountCountCountTotal_Count
Dimension1Country Dimension    
Code A 21-3
 US1-- 
 CANDA11  
 CHINA    
Code B  437
 US  2 
 CANDA 21 
 CHINA 2  
Code C 1  1
 US    
 CANDA1   
 CHINA    

 

Accepted Solutions (0)

Answers (2)

Answers (2)

Yogeshwar_M
Explorer

Hi @Sumalini ,

You can find subtotal function in model level only.

In model calculation 

Subtotal

Yogeshwar_M_1-1738687321917.png

Subtotal%

Yogeshwar_M_0-1738687199603.png

 

In story you can also do it but you need to create restricted measure and then calculate subtotal

Kindly upvote and like if you find it useful.

Thanks

Sumalini
Participant
0 Kudos
@Yogeshwar : Could you please let me know on how create restricted measure and then calculate subtotal, i tried several ways but couldn't find a way
Wilton
Associate
Associate
0 Kudos
I could not find the subtotal function either, only the grandtotal function is available.
N1kh1l
Active Contributor

@Sumalini 

I do not think scripting is the option here. You should try Subtotal or % subtotal for this.

https://help.sap.com/docs/SAP_ANALYTICS_CLOUD/00f68c2e08b941f081002fd3691d86a7/3b7c99a7a7cd4a29bb1c5...

 

Hope this helps !!

Nikhil

Sumalini
Participant
0 Kudos

@nikhil: Thanks for your reply. I think SubTotal function will fulfill my requirement.

But i couldn't see Subtotal function in calculation editor. Could you please help me here. I can see only Substring function, if i use ctrl+space.

Also in the functions, i can see GrandTotal function but not Subtotal. i'm i missing something? I also have Totals in my table, which is required for Subtotals as mentioned in documentation provided by SAP

Sumalini_0-1738685677261.jpeg

Sumalini_1-1738685870856.jpeg

Thanks,

Sumalini.