Decomposition Tree with R-Visualization in SAC.
Power BI has Decomposition Tree Graph. It is very good for helping business users to do their Data Analysis.
How’s in SAC?
This article is to describe the using of Collapsible Tree having close functionality to Decomposition Tree Graph in SAC.
- Collapsible Tree Features
- Setup Collapsible Tree R-Visualization in Analytic Application
- Setup Dimensions & Measures at Input Data.
- Build R-Visualization script
Power BI has Decomposition Tree Graph. It is very good for helping business users to do their Data Analysis. SAC has R-Visualization. Collapsible Tree has a close functionality for Decomposition Tree.
R Visualization is an integrated suite of software that includes packages for advanced visualizations and statistics. SAP Analytic Cloud allow us to create and edit visualizations based on R Script.
This article use Analytic Application and to describe how to integrate between Analytic Application and R Visualization SAC Widget. This article describes only Collapsible Tree summary.
I use this collapsible tree to show the relationship between Sender & Receiver in Cost Object Allocation data. Business will have visualization in interactive collapsible tree Diagram.
Collapsible Tree Features
- Allowing us to create interactive collapsible tree Diagram. Shows the data with interactive Tree Diagram & it is collapsible.
- The Node Position, Top to Bottom, is Descending based on Account Dimension/Measure.
- Each of Node Size can be determined by numeric Column/Account Dimension/Measures. Other than Numeric Column, the Node size can be determined by total counts of immediate children of the node.
- Each of Node has Tooltip and it gives information about Account Dimension/Measure(attribute) and Node’s label.
- The SAC Dimensions shown in the Collapsible Tree can be rearranged, added and removed. This feature is not specifically only for Collapsible tree. It needs Analytic Applications script added. I will describe in my next blog.
Setup Collapsible Tree R-Visualization in Analytic Application
This article use Analytic Application.
R Visualization widget is found at Insert Tab -> Add -> More Widgets -> R Visualization.
setup Dimensions & Measures at Input Data.
Build R-Visualization Script
This is R-Visualization Script used to show the relationship between Sender and Receiver Cost Object data.
library('collapsibleTree') library(RColorBrewer) df<-ZMODEL_ALLOCATION lnodesize <- as.character(ZMODEL_ALLOCATION$`Node Size`) df$Color <- df$zxpcforlc collapsibleTreeSummary( df, inputId = NULL, root = "Total Cost", fontSize = 9, attribute="ZMeasureLC", hierarchy = c(dims), maxPercent = 10, fillFun = colorspace::rainbow_hcl, zoomable = TRUE, tooltip = TRUE, collapsed = TRUE )
Please find below about the Arguments detail and other Arguments that you can use.
Collapsible Tree Summary R-Visualization can be considered if you want to show the data in Collapsible Interactive Diagram. One thing missing here is the measure not able to be shown in the Nodes Label. It only shows if the mouse hover in the node and measure will be shown in the Tooltip.
What do you think about Collapsible Tree Summary R-Visualization?
Do you have other R-Visualization graph having a close functionality to Decomposition Tree?
Please add to the comments.
Collapsible Tree arguments. Link
Setup R-Visualization in Analytic Design. Link
Collapsible Tree. Link