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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Adding new empty value to donut chart w/ pre-existing value

Hello,

 

I have a donut chart that displays the total cube % of products in my Tote Info and Transaction Log tables. I am hoping add an empty value to the existing donut chart. The way I'm hoping to calculate the 'empty' value is by subtracting the Total Cube from the Total Usable Truck Cube. I've already created a key measure called Total Empty Truck Cube but I'm not sure if this is the best way to incorporate it into the donut chart. Below is the sample file.

 

Total Empty Truck Cube = [Total Usable Truck Cube] - [Total Cube]
 
 
Adding Empty Value to Donut Chart.PNG
4 REPLIES 4
jdbuchanan71
Super User
Super User

Hello @Anonymous 

Is the problem you have run into is the circular reference if you try to add [Total Empty Truck Cube] into [Total Cube]?

Instead you could calc [Total Empty Truck Cube] like so:

Total Empty Truck Cube =
[Total Usable Truck Cube]
    - CALCULATE (
        SUM ( 'Transaction Log'[Cubic Volume (ft)] ),
        FILTER ( 'Transaction Log', 'Transaction Log'[Cube Level] = "Item" )
    )
    - CALCULATE (
        SUM ( 'Tote Info'[Cubic Volume (ft)] ),
        FILTER ( 'Tote Info', 'Tote Info'[Cube Level] = "Tote" )
    )
Anonymous
Not applicable

@jdbuchanan71 

 

The issue I'm running into is I'm not sure how to get a section added to the donut chart called "Empty" which has a value of ('Key Measures'[Total Usable Cube] - 'Key Measures'[Total Cube]). I want the existing value descriptions (e.g. Pallet, Dry Trays, Fresh Trays, etc.) to remain. Does this make sense?

 

When I tried your new measure all of the percentages roughly flattened to around 7%.

Hello @Anonymous 

That's because of how large the [Total Usable Truck Cube] value is.  Is that measure calcing correctly?

UsableTruckCube.jpg

Anonymous
Not applicable

@jdbuchanan71 

 

That data looks accurate. See my screenshot below which aligns with yours. Using the below information, if my donut chart only showed data from 1/2/2019, I would hope to see (7,437.8/24,416) = 30.5% of the cube displayed by 'Container'[Description] and (16,978.19/24,416) = 69.5% displayed as "Empty".

 

Empty Tote Cube Data.PNG

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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