Forum Discussion

cshowe80's avatar
cshowe80
Helper I
9 years ago
Solved

Creating a New Measure ...

I've got a report I'm producing to show year over year values and I've just about completed it. Now I've been given one request thats thrown me for a loop. I've got a number of "products" and in those there are 4 sales channels: Direct Sale, Affiliate, Auction, Marketing. All but direct sales are considered "unsold" as we're tracking sales team effectivness. 

 

I've combined the two relevent columns in excel as a new column using =E1& "_"&M1 which outputs as Product_Sold or Product_Unsold. Now the goal is to sum up and then divide the Product_Sold by Product_Unsold to get a "sell through rate" meassurment for each of the individual products. 

 

If this were excel I would use a simple SUMIF function and then divide them. I'm not able to do this as easily in PowerBI. Is anybody able to help with this? Is there a better method within the Excel sheet I can use? Is there an easy fix using a "new meassure" in PowerBI?

  • Measure = CALCULATE(SUM([Column]),FILTER(Table,[Column]="Product_Sold")) / CALCULATE(SUM([Column]),FILTER(Table,[Column]="Product_Unsold"))

    Something along those lines

5 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion
    Measure = CALCULATE(SUM([Column]),FILTER(Table,[Column]="Product_Sold")) / CALCULATE(SUM([Column]),FILTER(Table,[Column]="Product_Unsold"))

    Something along those lines

    • cshowe80's avatar
      cshowe80
      Helper I

      Thanks for the reply but I'm either dense or something else is up here. Below is what I input into the new measure and it isn't working. 

       

      Sell Through = CALCULATE(SUM([Total impressions]),FILTER(YOY,[Impression Groups]="Sold")) / CALCULATE(SUM([Total impressions]),FILTER(YOY,[Impression Groups]="Unsold"))

       

      So I'm trying to take all Impressions which have a "Sold" designation and dividing them by all impressions which have a "unsold" designation. The Slicer will then output the value of that sites as a % sell through figure. 

       

      Am I dense here? Missing something simple? This gave me a 1. I also can't figure out how to make this display in % format under modeling it's greyed out. 

       

      • v-huizhn-msft's avatar
        v-huizhn-msft
        Microsoft Employee

        Hi cshowe80,

        If there is "Sold" and "unsold" in your "Impression Groups" column, there are Direct Sale, Affiliate, Auction, Marketing on the column based on my understading. If my understanding is right, you should use the following formula.

        Sell Through = DIVIDE(CALCULATE(SUM([Total impressions]),FILTER(YOY,[Impression Groups]="Direct Sale")) , CALCULATE(SUM([Total impressions]),FILTER(YOY,[Impression Groups]<>"Direct Sale")))


        Then select the measure, set it's type as percentage by Data Type under Modeling.

        Please feel free to ask if you have other issue.

        Best Regards,
        Angelia