Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Revenue Calculation for a specific selected criteria

Hi 

I am seeking help with  a revenue calculation 

 

I want a total revenue for packages marked "prepaid", I am aware I can just use a filter option but seeking a formula which will exclude everything under the packages but summarize me all prepaid packages with price 34

 

 

 

  • hi, Anonymous 

    If you want to create a "New Column", you could use EARLIER Function to add a formula as below

    New Column =
    CALCULATE (
    SUM(Totalrevenue nok 2018),
    FILTER (
    'Table',
    EARLIER(Table[Packages]) = "Pre-Paid" && EARLIER(Table[Package Price]) = 34
    )
    )

     

    Best Regards,

    Lin

4 Replies

  • HotChilli's avatar
    HotChilli
    Community Champion
    Sales Measure =
    CALCULATE (
        your calculation here, 
        FILTER (
            'Table', 
            Table[Packages] = "Pre-Paid" && Table[Package Price] = 34
        )
    )

    You'll need an explicit FILTER in your DAX formula, something like this

    • Anonymous's avatar
      Anonymous
      Not applicable

      HotChilli 

      I was unable to input in the  "calculation here" field , my actual total reveunue calculation is as shown in the image is as a form of "New Column " .. as per your instructio below i couldnt do the following 

       

      Sales Measure =
      CALCULATE (
          Totalrevenue nok 2018, 
          FILTER (
              'Table', 
              Table[Packages] = "Pre-Paid" && Table[Package Price] = 34
          )
      )


      • HotChilli's avatar
        HotChilli
        Community Champion

        a measure has to have an aggregation, usually for numbers that means SUM.