Forum Discussion
Decomposition Tree - How should I structure my data?
- 1 year ago
If I understood well your request, you need to follow these steps :
Step 1: Get the Sankey Diagram Visual
Power BI's native "Decomposition Tree" isn't suitable for sequential flows. You'll need a Sankey diagram custom visual.
- Open Power BI Desktop.
- In the Visualizations pane, click the ellipsis (...) and select "Get more visuals."
- Search for "Sankey Diagram" in the marketplace.
- Choose a visual (e.g., "Sankey Diagram by MAQ Software") and click "Add."
- The Sankey icon will now appear in your Visualizations pane.
Step 2: Create the Sankey Diagram
- Click the Sankey Diagram icon to add it to your report page.
- In the Visualizations pane's field wells, drag your data:
- Source: FromWebpageCategoryName
- Destination: ToWebpageCategoryName
- Weight: Create a new measure:Drag this Distinct User Count measure to the Weight field.
Distinct User Count = DISTINCTCOUNT(UserJourneyPaths[UserID])
- Your Sankey diagram will now display the flow of users between page categories.
Step 3: Implement Filters
You want separate filters for each page rank's category, along with a global location filter.
A. Global Filter
- Add a Slicer visual to your report.
- Drag the Location column from your UserJourneyPaths table to the Slicer's field well. This filters the entire Sankey by user location.
B. Page-Specific Category Filters (for "Category Page 1", "Category Page 2" etc.)
You have a few options to achieve this filtering:
Recommended: Leveraging Sankey Interactivity (Simpler & More Intuitive)
- No extra slicers needed for categories at specific ranks.
- Simply instruct users to click directly on any node (webpage category) within the Sankey diagram. Power BI will then highlight or filter the paths connected to that node, allowing users to explore the flows originating from or leading to that specific category at its position in the journey. This is often the most natural way to filter a flow diagram.
Alternative: Multiple Slicers for Each Rank's Category (More Direct Control)
- This provides explicit slicers for each page rank, but requires more setup and can become complex for many ranks.
- Add a Slicer visual.
- Drag FromWebpageCategoryName to the slicer's field well.
- Crucial Step: With this slicer selected, go to the Filters pane. Add a visual-level filter on FromPageViewOrderRank with a value of 1. This ensures the slicer only shows categories for the first page view. Label this slicer "Page 1 Category."
- Repeat: For "Page 2 Category," add another slicer, drag ToWebpageCategoryName to it, and apply a visual-level filter on ToPageViewOrderRank with a value of 2. Continue this for additional ranks as needed.
- Manage Interactions: Select your Sankey diagram. Go to "Format" > "Edit interactions." For each "Page X Category" slicer, ensure the filter icon is selected for the Sankey visual.
Step 4: Formatting & Refinement
- Titles & Labels: Add clear titles for your report and the Sankey. Ensure node labels are readable.
- Data Labels: In the visual's "Format" options, enable and customize data labels to show Distinct User Count on nodes/links.
- Colors & Tooltips: Adjust colors for clarity. Customize tooltips to display relevant flow information.
- Layout: Arrange the Sankey and slicers logically on your report page.
Step 5: Test & Publish
- Test Thoroughly: Interact with all filters and click on nodes to ensure the diagram responds correctly.
- Performance: Monitor performance for large datasets; optimize if necessary.
- Publish: Once satisfied, publish your report to the Power BI Service for sharing.
By completing these steps, you should be able to have the desired tree to monitor websites navigation.
If I understood well your request, you need to follow these steps :
Step 1: Get the Sankey Diagram Visual
Power BI's native "Decomposition Tree" isn't suitable for sequential flows. You'll need a Sankey diagram custom visual.
- Open Power BI Desktop.
- In the Visualizations pane, click the ellipsis (...) and select "Get more visuals."
- Search for "Sankey Diagram" in the marketplace.
- Choose a visual (e.g., "Sankey Diagram by MAQ Software") and click "Add."
- The Sankey icon will now appear in your Visualizations pane.
Step 2: Create the Sankey Diagram
- Click the Sankey Diagram icon to add it to your report page.
- In the Visualizations pane's field wells, drag your data:
- Source: FromWebpageCategoryName
- Destination: ToWebpageCategoryName
- Weight: Create a new measure:Drag this Distinct User Count measure to the Weight field.
Distinct User Count = DISTINCTCOUNT(UserJourneyPaths[UserID])
- Your Sankey diagram will now display the flow of users between page categories.
Step 3: Implement Filters
You want separate filters for each page rank's category, along with a global location filter.
A. Global Filter
- Add a Slicer visual to your report.
- Drag the Location column from your UserJourneyPaths table to the Slicer's field well. This filters the entire Sankey by user location.
B. Page-Specific Category Filters (for "Category Page 1", "Category Page 2" etc.)
You have a few options to achieve this filtering:
Recommended: Leveraging Sankey Interactivity (Simpler & More Intuitive)
- No extra slicers needed for categories at specific ranks.
- Simply instruct users to click directly on any node (webpage category) within the Sankey diagram. Power BI will then highlight or filter the paths connected to that node, allowing users to explore the flows originating from or leading to that specific category at its position in the journey. This is often the most natural way to filter a flow diagram.
Alternative: Multiple Slicers for Each Rank's Category (More Direct Control)
- This provides explicit slicers for each page rank, but requires more setup and can become complex for many ranks.
- Add a Slicer visual.
- Drag FromWebpageCategoryName to the slicer's field well.
- Crucial Step: With this slicer selected, go to the Filters pane. Add a visual-level filter on FromPageViewOrderRank with a value of 1. This ensures the slicer only shows categories for the first page view. Label this slicer "Page 1 Category."
- Repeat: For "Page 2 Category," add another slicer, drag ToWebpageCategoryName to it, and apply a visual-level filter on ToPageViewOrderRank with a value of 2. Continue this for additional ranks as needed.
- Manage Interactions: Select your Sankey diagram. Go to "Format" > "Edit interactions." For each "Page X Category" slicer, ensure the filter icon is selected for the Sankey visual.
Step 4: Formatting & Refinement
- Titles & Labels: Add clear titles for your report and the Sankey. Ensure node labels are readable.
- Data Labels: In the visual's "Format" options, enable and customize data labels to show Distinct User Count on nodes/links.
- Colors & Tooltips: Adjust colors for clarity. Customize tooltips to display relevant flow information.
- Layout: Arrange the Sankey and slicers logically on your report page.
Step 5: Test & Publish
- Test Thoroughly: Interact with all filters and click on nodes to ensure the diagram responds correctly.
- Performance: Monitor performance for large datasets; optimize if necessary.
- Publish: Once satisfied, publish your report to the Power BI Service for sharing.
By completing these steps, you should be able to have the desired tree to monitor websites navigation.
Thank-you for the advice, that's helpful feedback.