Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

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]
 
 

4 Replies

  • 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's avatar
      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%.

      • jdbuchanan71's avatar
        jdbuchanan71
        Icon for Super User rankSuper User

        Hello Anonymous 

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