Forum Discussion

datadelta's avatar
datadelta
Helper III
2 years ago
Solved

Divide a row value by another row value

I am sorry but I have tried every way possible to get this to work before coming here.

 

I have have a data set with rows and I need to divide each row by another row within the set.

 

Store       Has Sales  Total Stores Avail  Penetration %

John's          74                      95                    77.89%

 

How do I write the formula in BI to get the penetration percentage?  Everything I write tries to do it by sum or by column.  

  • Penetration%Measure =

    VAR _HasSales = SUM(Table[Has Sales] --or measure already created

    VAR _TotalStores = SUM(Table[Total Stores Avail]--or measure already created
    RETURN
    DIVIDE(_HasSales , _TotalStores )
    then set format to %

  • Thank you.

    I suddenty realized I was overcomplicating the problem.

     

    = SUM('AllStores'[Has Sales])/(95)

     

2 Replies

  • ALLUREAN's avatar
    ALLUREAN
    Solution Sage

    Penetration%Measure =

    VAR _HasSales = SUM(Table[Has Sales] --or measure already created

    VAR _TotalStores = SUM(Table[Total Stores Avail]--or measure already created
    RETURN
    DIVIDE(_HasSales , _TotalStores )
    then set format to %

    • datadelta's avatar
      datadelta
      Helper III

      Thank you.

      I suddenty realized I was overcomplicating the problem.

       

      = SUM('AllStores'[Has Sales])/(95)