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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply

Double filter to calculate revenue

Hi everyone, i have as i believe a simple question.

 

I have a ddbb with a small structure (only this columns: account(revenue and expenses), type (there are 3 types, actual, plan and last year), and ammount $). I need to create a calculate field who gave me the account (revenue) but only when the type is actual.  the idea is multiply that new calculated field *-1 because its a negative value in the ddbb. There is possible to do this?

 

Thanks in advance

1 ACCEPTED SOLUTION
audreygerred
Super User
Super User

Hi! I created some dummy data to demonstrate what I did:

audreygerred_0-1721923297359.png

With this data I then created the following measure:

TotalRevenueActual :=
CALCULATE(
SUM('YourTableName'[Amount]),
'YourTableName'[Account] = "Revenue",
'YourTableName'[Type] = "Actual"
)

 

The results: 

audreygerred_1-1721923355898.png

And, -100 is accurate as it is the amount where Account is Revenue and Type is Actual. Hope this helps!

 

Another option would be in Power Query - you can pivot the data so that Revenue and Expense are two different columns. 

audreygerred_2-1721923498281.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

3 REPLIES 3
audreygerred
Super User
Super User

Hi! I created some dummy data to demonstrate what I did:

audreygerred_0-1721923297359.png

With this data I then created the following measure:

TotalRevenueActual :=
CALCULATE(
SUM('YourTableName'[Amount]),
'YourTableName'[Account] = "Revenue",
'YourTableName'[Type] = "Actual"
)

 

The results: 

audreygerred_1-1721923355898.png

And, -100 is accurate as it is the amount where Account is Revenue and Type is Actual. Hope this helps!

 

Another option would be in Power Query - you can pivot the data so that Revenue and Expense are two different columns. 

audreygerred_2-1721923498281.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Hi Audreygerred, thanks a lot. it probably will work!

 

Regards

No problem! Happy to help! Also, I forgot to mention the handling of the negative. I adjusted the DAX below:

TotalRevenueActual =
CALCULATE(
    SUM('Table (7)'[Amount]),
    'Table (7)'[Account] = "Revenue",
    'Table (7)'[Type] = "Actual"
)*-1
 
audreygerred_0-1721924192729.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.