Forum Discussion

NewbNeedHelp's avatar
NewbNeedHelp
Icon for Helper I rankHelper I
3 years ago
Solved

Matrix Column with % of Positive Values Only

Here is my data table:

CategoryYearUnits
Category 1Last Year6,349
Category 2Last Year6,474
Category 3Last Year9,317
Category 4Last Year483
Category 5Last Year1,944
Category 1This Year2,140
Category 2This Year6,194
Category 3This Year8,541
Category 4This Year2,287
Category 5This Year8,991

 

Here is the output I want:

 Last Year UnitsThis Year UnitsUnit ChangeUnit Growth% of Unit Growth
Category 16,3492,140-4,20900%
Category 26,4746,194-28000%
Category 39,3178,541-77600%
Category 44832,2871,8041,80420%
Category 51,9448,9917,0477,04780%
Total24,56728,1533,5868,851100%

 

Here is the output I get when attempting it in PowerBI (note the 50% and 197% that I want to be 20% and 80% respectively):

 

I want unit growth to be the sum of all positive unit growths of the categories: 8,851. But in PowerBI, it isn't looping by category (not sure if that's the right lingo), it's just giving me the change at the total level.

 

Here is link to PBI file (I'm not able to attach to this post directly).

https://wetransfer.com/downloads/14e8b8f657ef696c552f3046f893b23f20230320230651/ae2e90784b7d361892c8b718ca04426220230320230704/f46ecc

 

Thank you for any help!

MC

 

7 Replies

    • Tito's avatar
      Tito
      Icon for Helper IV rankHelper IV

      Hi Ashish_Mathur ,
      i cannot download the file. Can you please write the solution here? Thanks
      Best regards

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

        Hi,

        I do not have the file.  Share data in a format that can be pasted in an MS Excel file.  Explain the question and show the expected result.