sankey
8 TopicsMicrosoft Sankey Visual: How can I prevent destination nodes being automatically reordered?
Hi all, I'm using the Microsoft Sankey visual in Power BI Desktop and would like to keep the node order consistent between the left and right sides of the chart. My source data is structured as: From To Value Apples Apples 45 Apples Pears 7 Pears Fig 26 Fig Cherry 115 Cherry Cherry 13 Intended category order: Apple Pear Fig Cherry However, the Sankey visual automatically changes the order of the destination nodes presumably to reduce flow crossings. I have already tried: Creating a numeric sort column (1 = Severe, 2 = Moderate, 3 = Mild, 4 = Normal renal function) Using Sort by Column on the destination field (To) Creating a separate Category/SortOrder lookup table Sorting both the source data and lookup table correctly Disabling Auto links reorder in the visual settings Power BI accepts the sort order without errors, but the Sankey visual continues to reorder the destination nodes. Manually dragging is not ideal, as the freehand movement does not allow precision. My questions are: Does the Microsoft Sankey visual support a fixed destination node order? Is there a supported way to force the same category order on both sides of the Sankey Any advice would be greatly appreciated. Thanks!Sankey Chart Data model Preparation
Hi, I want to have a Sankey chart to display the budget Sector -> Directorate - Expenditure type i.e 2 level one How I can create a table to get the data in proper format for Sankey chart from original data. We are reading data from Excel sheet. Adding the actual data format, required Sankey data format, and the expected chart. Kindly help me to build the DAX query to create dynamic calculated table so that I can bind it to Sankey chart. Thanks in advance!! Original Data Year Sector Directorate Description Expenditure Type Estimated Budget 2024 Sector A Directorate AA1 Project 1 Locked 10000 2024 Sector A Directorate AA1 Project 2 Spent 2000 2024 Sector A Directorate AA1 Project 3 Remaining 8000 2024 Sector A Directorate AA2 Project 4 Locked 5000 2024 Sector A Directorate AA2 Project 5 Remaining 2000 2024 Sector B Directorate BB1 Project 6 Locked 50000 2024 Sector B Directorate BB1 Project 7 Spent 25000 2024 Sector B Directorate BB1 Project 8 Remaining 25000 2024 Sector B Directorate BB2 Project 9 Locked 100000 Required data format Source Target Budget Level Sector A Directorate AA1 20000 1 Sector A Directorate AA2 7000 1 Sector B Directorate BB1 100000 1 Sector B Directorate BB2 100000 1 Directorate AA1 Locked 10000 2 Directorate AA1 Spent 2000 2 Directorate AA1 Remaining 8000 2 Directorate AA2 Locked 5000 2 Directorate AA2 Remaining 2000 2 Directorate BB1 Locked 50000 2 Directorate BB1 Spent 25000 2 Directorate BB1 Remaining 25000 2 Directorate BB2 Locked 100000 2Solved2.3KViews0likes5CommentsHow can I make requests for the Sankey visualization, or contribute to same?
The Sankey visualization (currently 3.0.3) is surprisingly good, though still not quite ready for production use. The "Help and Support" link sent me to the PowerBI Community site, so I'll try to connect here. The great strength of the current visualization is that it automatically maps single level data (source / data/ value) and is NOT a "category breakdown" subset of Sankey functionality. Great! But... There needs to be more legends of amounts and percentages that can be seen without flyover, and I can't find, well, any at all! While I don't think I would enjoy getting into the main algorithm, I could conceivably contribute to improving the text items. If this is a developed-by-Microsoft item, then I'd like to submit requests to the team for enough features for the code to be useful (more than a toy). The only other option (ChartExpo) is in fact a category breakdown visualization, and none of my use cases would be compatible with a category breakdown Sankey. Bottom line: 1) is there an "owner" of Sankey that I can communicate with, or 2) is the Sankey visualization already open-source with contributions possible?1.4KViews1like0Comments[help] sankey image can't be displayed in poweBI
Hi team, I have below script. import pandas as pd import chart_studio.plotly as py import plotly.graph_objects as go labelListTemp1 = list(set(dataset.source.values)) labelListTemp2 = list(set(dataset.target.values)) labelList = labelListTemp1 + labelListTemp2 sankey_node = list(dict.fromkeys(labelList)) fig = go.Figure(data=[go.Sankey( node = dict( pad=15, thickness=20, line = dict(color = "black", width = 0.5), label = labelList, color = "blue" ), link = dict(source = dataset.source.apply(lambda x: labelList.index(x)), target = dataset.target.apply(lambda x: labelList.index(x)), value = dataset.value))]) fig.show() And I run it in powerBI with enabling python script. but the result is that the code opened a browser and displayed the sankey in browser, instead of in powerBI. 1. the code opened a browser and displayed the sankey in browser. 2. I would like the sankey chart displayed in powerBI, but powerBI says that 'the visual can't be displayed'. Is there anyone that succesfully created sankey chart by python plotly lib? can any expert help take a look what's wrong here? Thanks, Cherie840Views0likes0CommentsConvert DAX expression into a table
Hi all I need to convert this DAX measure Measure = CALCULATE( MAX('Table 1'[Status]), FILTER('Table 1','Table 1'[Level]=MAX('Table 1'[Level])) ) into a new table. I tried with CALCULATETABLE and MAXX but it does not work. I want to convert because the Sankey diagram I need to use does not accept measures in the axis The data I have is as follows: Table 1: Name Level Status Extract 2D plans APS High Extract 2D plans EXE Medium Extract 2D plans LIV Low Other Function APS Medium Other Function EXE Low Other Function LIV High And what I want is as follows: Name APS EXE LIV Extract 2D plans High Medium Low Other Function Medium Low High Thanks in advance.1.3KViews0likes2CommentsAdding Fill Color to Data Labels for Sankey diagrams
I'm using the Sankey 2.0.1 visualization to create really complicated pathways with a large cohort. The issue I'm running into is that there are a lot of lines that make the data labels hard to read because the lines are behind the data label. The options I have are to change the font color or font size. Color doesn't help at all and changing the font cuts the label off so I can't read the entire label anymore. I'd would LOVE an option to change the fill color of the data label. Kind of like what Microsoft has in PPT for data labels on graphs, but in the Sankey 2.0.1 tool! Thanks! Michael3.2KViews1like0CommentsProblem with Sankey visual % Weight
I have downloaded the sankey visual 1.10.0 from the Marketplace but it appears to me that the precentage weight isn't accurately show the difference between flows. From the source to destination I have flows ranging from 0.5 to 4 to 46% but the flow widths are a similar size for 0.5% and 4% and the 46% flow isn't much wider than either of them. My flow precentages are (0.5%, 0.5%, 4%, 4%, 41%, 46%) If I don't have a precentage count calculation on the weight I get more realistic thicknesses but I would like to see the % that flows from source to destination Am I using the Sankey correctly?2.3KViews0likes5Comments