Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
javaroni
Regular Visitor

Sankey Chart - Deneb - Measure Problem

Hi,
i´m using Deneb to create a sankey chart.
Everything is working until i starting to use a measure as value.

When i use a column as value, it´s works

javaroni_0-1724695646673.png

But when a using a sum measure and not the column, the chart turned very messy.

javaroni_1-1724695694995.png

 

I don't know how to fix this. Another thing I want to fix is that the labels occasionally overlap each other."
 
Thanks



1 ACCEPTED SOLUTION

That's a weird input format 🙂 Have to see how this can be converted.

 

As for the texts overlapping - there's not much you can do apart from mimicking the stacking logic that is used for the boxes. you would need to probe the frame boundaries for the rendered text, see if any x values overlap, and then push the y origin up for an amount that clears the conflict.  But this may cascade when you have lots of small boxes with long text.

View solution in original post

8 REPLIES 8
Anonymous
Not applicable

Hi @javaroni ,

If you have solved the problem, please accept lbendlin reply and your reply as the solution to help the other members find it more quickly.

 

Best Regards,

Wisdom Wu

javaroni
Regular Visitor

Tks for the replie @lbendlin.
Can you give a an example for the overlap solution =)?

Here's something I did recently  (sorry for the blurring)

 

lbendlin_0-1724702139776.png

 

I used a sorted window for the stacking.

    {
      "window": [
        {
          "op": "sum",
          "field": "CU (s)",
          "as": "cum_total"
        }
      ],
      "sort": [
        {
          "field": "CU (s)",
          "order": "descending"
        }
      ],
      "frame": [null, 0]
    },
    {
      "calculate": "datum.cum_total - datum['CU (s)'] + 2", "as": "bottomedge"
    }

 

"bottomedge"  is the derived y value for each bar's rendering box.

That´s Great
Thank you for the help

javaroni
Regular Visitor

I figured out how to fix this.
Just select "Shows items with no data" then the measure will work lol

lbendlin
Super User
Super User

Can you show your Vega/Vega Lite code and some sample data?

 

Deneb doesn't know the difference between a DAX measure and a DAX column. Are you adding calculations in Deneb?

Here is the code: https://codeshare.io/WLpR1M
When a use the measure the stack column turn into null values.

Here is data sample:
DATEsourcedestinationvaluecategorystacksortlabelsAnovalue no signal
Q2 2023Gross Revenue with intercompanyIntercompany889.000,00   left2023889000
Q2 2023Gross Revenue with intercompanyGross Revenue without intercompany0,00   left20230
Q2 2023Groos ProfitOperations Expenses-827.881,35   left2023827881,35
Q2 2023Groos ProfitOperating Profit (Before Tax) EBIT-980.986,03   left2023980986,03
Q2 2023   Gross Revenue with intercompany12left2023 
Q2 2023   Gross Revenue with intercompany11left2023 
Q2 2023   Groos Profit41left2023 
Q2 2023   Groos Profit41left2023 

That's a weird input format 🙂 Have to see how this can be converted.

 

As for the texts overlapping - there's not much you can do apart from mimicking the stacking logic that is used for the boxes. you would need to probe the frame boundaries for the rendered text, see if any x values overlap, and then push the y origin up for an amount that clears the conflict.  But this may cascade when you have lots of small boxes with long text.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.