Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
3 years ago
Solved

Help with adding amounts by category

Hello

I need to help please to create a dax formula that adds the sales of my channel column:

I don't know if it's possible

of anteman

  • PaulDBrown's avatar
    PaulDBrown
    3 years ago

    You need the following measure:

    % por canal =
    VAR _ALL = CALCULATE ([Measure Sum Deuda], ALL(fTable[Canal])

    RETURN

    DIVIDE([Measure Sum Deuda]), _ALL)

    Format this measure as a % in the ribbon

     

    then create the line chart using this measure and add fTable[Canal] as the legend

4 Replies

  • PaulDBrown's avatar
    PaulDBrown
    Community Champion

    You can show the totals by "Canal" in any number of ways: for example using a simple SUM measure or using ALLEXCEPT as a filter in a measure:

    Measure Sum Deuda = 
    SUM(fTable[DEUDA TOTAL])
    SUM ALLEXCEPT = 
    CALCULATE([Measure Sum Deuda], ALLEXCEPT(fTable, fTable[Canal]))

     

    I've attached the sample PBIX file

  • thank you very much, but to be able to make a line chart that shows in % ?

    that I need to replicate

    Best regards

    • PaulDBrown's avatar
      PaulDBrown
      Community Champion

      You need the following measure:

      % por canal =
      VAR _ALL = CALCULATE ([Measure Sum Deuda], ALL(fTable[Canal])

      RETURN

      DIVIDE([Measure Sum Deuda]), _ALL)

      Format this measure as a % in the ribbon

       

      then create the line chart using this measure and add fTable[Canal] as the legend