Forum Discussion

Alessandra's avatar
Alessandra
Icon for Helper I rankHelper I
8 years ago
Solved

Calculate weighted distribution in a matrix

Hi everyone,   I'm trying to calculate how many products are in each bussiness by brand and manufacturer,  I already have the denominator of the weighted distribution, which is:   CALCULATE(SUM(...
  • v-ljerr-msft's avatar
    v-ljerr-msft
    8 years ago

    Hi Alessandra,

     

    Based on my test, the formula below should work in your scenario. :smileyhappy:

    Measure = 
    var businessIDs = DISTINCT(Hoja1[BusinessID])
    return
    CALCULATE(SUM(Hoja1[SalesVolume]),FILTER(ALL(Hoja1),CONTAINS(businessIDs,[BusinessID],Hoja1[BusinessID])))

    Here is the sample pbix file for your reference.

     

    Regards