Forum Discussion

BugmanJ's avatar
BugmanJ
Icon for Helper V rankHelper V
3 years ago
Solved

% (Percentage) of data below a set value? (Line Graph)

Hello,

I am trying to produce a simple line chart which has:

 

Y-Axis - Percentage of total orders for that month below "20". (Order column is just a whole number column representeing number of minutes)

X-Axis - Month along the bottom (done, using calander table)

Data Columns:

Table: "Cake"

"Orders" (Whole Number)
Month (From Calander Table)

How to get this to work?

Thanks

  • Hi BugmanJ,

     

    You can use:

     

    Y-Axis = CALCULATE(COUNT('Table'[Orders]),FILTER('Table','Table'[Orders]<20)) / CALCULATE(COUNT('Table'[Orders]))

     

    Format the measure then as a percentage.

     

    Works for you? Mark this post as a solution if it does!
    Consider taking a look at my blog: Forecast Period - Previous Forecasts

  • Hi BugmanJ ,

     

    You can try formula like below:

    Percentage_ =
    VAR div2 =
        CALCULATE ( SUM ( FactInternetSales[SalesAmount] ), ALL ( DimProduct ) )
    RETURN
        DIVIDE ( SUM ( FactInternetSales[SalesAmount] ), div2, BLANK () )
    result = IF([Percentage_]<0.2,[Percentage_],BLANK())

     

    If the problem is still not resolved, please provide detailed error information and test data. Looking forward to your reply.


    Best Regards,
    Henry


    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

2 Replies

  • Shaurya's avatar
    Shaurya
    Icon for Memorable Member rankMemorable Member

    Hi BugmanJ,

     

    You can use:

     

    Y-Axis = CALCULATE(COUNT('Table'[Orders]),FILTER('Table','Table'[Orders]<20)) / CALCULATE(COUNT('Table'[Orders]))

     

    Format the measure then as a percentage.

     

    Works for you? Mark this post as a solution if it does!
    Consider taking a look at my blog: Forecast Period - Previous Forecasts

  • v-henryk-mstf's avatar
    v-henryk-mstf
    Icon for Community Support rankCommunity Support

    Hi BugmanJ ,

     

    You can try formula like below:

    Percentage_ =
    VAR div2 =
        CALCULATE ( SUM ( FactInternetSales[SalesAmount] ), ALL ( DimProduct ) )
    RETURN
        DIVIDE ( SUM ( FactInternetSales[SalesAmount] ), div2, BLANK () )
    result = IF([Percentage_]<0.2,[Percentage_],BLANK())

     

    If the problem is still not resolved, please provide detailed error information and test data. Looking forward to your reply.


    Best Regards,
    Henry


    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.