Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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

 

 

 

Capture help rev.JPG

1 ACCEPTED SOLUTION

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

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
HotChilli
Super User
Super User

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
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
    )
)


Capture help rev.JPG

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

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.