Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi!
I am new to PBI and already have a challenge that I have been struggling with.
I want to set the profit margin to always be 10% for every sales order line that has "cleaning service" as product type, regardless of what the actual margin would be. For any other product type / sales order line the margin should remain what it is.
Sample Data:
Sales Order Number | Product Type | Sales | Profit | Profit% |
1000 | SUV 1 | 4000 | 1500 | 38% |
1000 | Cleaning Service | 500 | 100 | 20% |
Total | 4500 | 1600 | 36% |
Should turn in:
Sales Order Number | Product Type | Sales | Adj. Profit | Adj Profit% |
1000 | SUV 1 | 4000 | 1500 | 38% |
1000 | Cleaning Service | 500 | 50 | 10% |
Total | 4500 | 1550 | 34% |
The solution has to be a dax measure as I don't have access to the source / can't add columns.
I already tried:
Solved! Go to Solution.
Hi @Anonymous ,
Try to cretae two calculated columns to get the result.
New Profit % = IF(and(Profit[Product Type] = "Cleaning Service",Profit[Profit%]>0.1),0.1,Profit[Profit%])
.
New Profit = IF(Profit[Product Type]="Cleaning Service",DIVIDE( Profit[New Profit %]*Profit[Profit ],Profit[Profit%]),Profit[Profit ])
Use those two columns in your report and you will get your desired output.
Thanks,
Arul
Thank you Arul!!
Hi @Anonymous ,
Try to cretae two calculated columns to get the result.
New Profit % = IF(and(Profit[Product Type] = "Cleaning Service",Profit[Profit%]>0.1),0.1,Profit[Profit%])
.
New Profit = IF(Profit[Product Type]="Cleaning Service",DIVIDE( Profit[New Profit %]*Profit[Profit ],Profit[Profit%]),Profit[Profit ])
Use those two columns in your report and you will get your desired output.
Thanks,
Arul
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
10 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
13 | |
12 | |
11 | |
8 |