Forum Discussion

mlz's avatar
mlz
New Member
8 years ago
Solved

DAX Calculation for Collections %

I have a Tabular cube and need to calculate Collections %   (Collections / Charges) BUT the denominator (Charges) to use should be the one highlighted in yellow (below). In the picture, you will se...
  • Phil_Seamark's avatar
    8 years ago

    HI mlz

     

    Are you able to describe the tables that Collections and Charges come from?  This will help clarify what DAX might be needed.

  • MarkLaf's avatar
    MarkLaf
    8 years ago

    So each collection has a related charge (i.e. many/one relationship between collections/charges)? If that is true, make sure a relationship is set up through the modeling tab, and then try the following measure:

    % of Charge = CALCULATE(DIVIDE(SUM(Collections[Amount]),SUM(Charges[Amount])),Collections)

    Is that getting closer to what you are looking for?

  • v-xjiin-msft's avatar
    8 years ago

    Hi mlz,

     

    Could you please share us some sample source data which we can copy and paste directly of the two tables if possible? So that we can make some proper tests. 

     

    Also, if you can share us your pbix file with One Drive or Dropbox or something else. It will be more helpful for us to find a solution.

     

    Thanks,
    Xi Jin.