Forum Discussion

alks_skla_f's avatar
alks_skla_f
Helper II
1 year ago
Solved

Column chart doesn't show information correctly

Hello, I want to show sum of quantity by item category. I have item_cat on x-axis and sum of quantity on y-axis. When I hover bar over, I can see that quantity is correct. Instead of taking sum of quantity for all categories as 100%, it takes the quantity by category as 100%. How can I fix it, please:

 

10 Replies

  • Hi alks_skla_f please check this

     

    PercentOfTotal =
    DIVIDE(
        SUM('Sheet5'[quantity]),
        CALCULATE(SUM('Sheet5'[quantity]), ALL('Sheet5'))
    )
    • alks_skla_f's avatar
      alks_skla_f
      Helper II

      please, see my answer above, this solution doesn't work for me

  • Hi,

    Try these measures

    Total = sum(Data[Qty])

    Measure = divide([Total],calculate([Total],all(Data[Item_cat])))

    Format Measure as %,

    Hope this helps.

    • alks_skla_f's avatar
      alks_skla_f
      Helper II

      Hello, still doesn't work:

      Total_num_qty = SUM('pizzeria orders'[quantity])
      test = divide([Total_num_qty],calculate([Total_num_qty],all('pizzeria item'[item_cat])))

      Is there any other solutrion, please?

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Super User

        Hi,

        Share the download link of the PBI file.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi alks_skla_f ,

     

    There are two approaches are we can do,

    1) using dax -->test=divide(sum(test_table[quanity]),(calculate (sum(test_table[quanity]),All(test_table[item_cate))

    2)Go to Y-axis in visual and right click on y-axis the and select show as value option and from there you can select Percentage of grand total.

     

    Regards,

    Surya.

    • alks_skla_f's avatar
      alks_skla_f
      Helper II

      please, see my answer above, this solution doesn't work for me

  • v-hashadapu's avatar
    v-hashadapu
    Community Support

    Hi alks_skla_f , Thank you for reaching out to the Microsoft Community Forum.

    could you please share more details including sample data and the steps you have taken so far (excluding sensitive content) with us to help solve your issue. If it is already solved, please share the answer here and mark it 'Accept as Solution', so others with similar queries may find it easily.
    Thank you.

  • v-hashadapu's avatar
    v-hashadapu
    Community Support

    Hi alks_skla_f ,could you please share more details including sample data and the steps you have taken so far (excluding sensitive content) with us to help solve your issue. If it is already solved, please share the answer here and mark it 'Accept as Solution', so others with similar queries may find it easily.
    Thank you.

  • v-hashadapu's avatar
    v-hashadapu
    Community Support

    Hi alks_skla_f , Since it's been a while since we last heard from you, we’re closing this thread per our follow-up policy. For any further discussions or questions, please start a new post in the Microsoft Fabric Community Forum — we’ll be happy to assist.

    Thank you for being part of the Microsoft Fabric Community.