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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Rbakker888
Helper II
Helper II

Multiplying based on category

I think I might be overlooking something simple here but I want to multiply my total revenue by x10 if the category of that order is "contract"

Rbakker888_0-1742470578030.png

This is what I currently use but while this works when I have the category's seperated, once I put them all in 1 visual for example a bar chart and want to just have a slicer on the side with the category's it will do everything x10 cause it ofcourse contains an order thats an contract but i hope you understand I dont want that and want it to simply only multiply the revenue created by the contract.

The other category's should just display the standard revenue as shown in the DAX formula I used.

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @Rbakker888  - check the below modified measure:

 

Total_Revenue_Adjusted =
SUMX(
Fact_Orders,
IF(
Fact_Orders[OrderCategory] = "Contract",
Fact_Orders[OrderRevenue] * 10,
Fact_Orders[OrderRevenue]
)
)

 

Hope this works. 





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

Proud to be a Super User!





View solution in original post

7 REPLIES 7
rajendraongole1
Super User
Super User

Hi @Rbakker888  - check the below modified measure:

 

Total_Revenue_Adjusted =
SUMX(
Fact_Orders,
IF(
Fact_Orders[OrderCategory] = "Contract",
Fact_Orders[OrderRevenue] * 10,
Fact_Orders[OrderRevenue]
)
)

 

Hope this works. 





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

Proud to be a Super User!





Ended up fixing my semantic model due to being granted access to it. This formula works now, thank you!

 

 

Would there also be a way to do this without referencing the entire table as there is currently 1 faulty column in it and by referencing it, it doesnt work. I am to fix this column but need another IT guy for the permission to the database for it.

Yes! You can avoid referencing the entire table by using a CALCULATE function and applying a filter on OrderCategory.

 

Total_Revenue_Adjusted =
VAR RevenueContract =
CALCULATE(
SUM(Fact_Orders[OrderRevenue]),
Fact_Orders[OrderCategory] = "Contract"
) * 10

VAR RevenueOther =
CALCULATE(
SUM(Fact_Orders[OrderRevenue]),
Fact_Orders[OrderCategory] <> "Contract"
)

RETURN
RevenueContract + RevenueOther

 

This should work even if a column is causing issues in the table. 





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

Proud to be a Super User!





Rbakker888_0-1742543186000.png

Your formula seems to have just put them all together, what you can see on this image is the top row which is related to a employee and the total amount of money they did orders for and below I want to see those numbers split up into the different categories. The left column is the base revenue which needs to be multiplied for the contract and the right column is the output of your formula.

bhanu_gautam
Super User
Super User

@Rbakker888 , Try using

Order Marge Bedrag Multiplied =
IF (
fact_Orders[Artikel Categorie] = "Contract",
fact_Orders[Order Marge Bedrag €] * 10,
fact_Orders[Order Marge Bedrag €]
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






This doesnt work due to the [artikel Catergorie] being a column connected from a semantic model, so I cannot reference to it when using this query.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors