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
Anonymous
Not applicable

Create measure that calculates different things based on value in another column

Hi,

 

I have a scenario where I would like to divide two measures I have created, but there is one case where i would like to calculate the percentage differently. 

The measures I have are:

1 - [Number of items]

2 - [$ Profit]

 

For all cases but one a simple 

test = DIVIDE([Number of items], [$ Profit])
 
But I have one case, where I need to divide the numerater by 4.
This is based on a column called "item name" = "togsett"
Is there a way to input this filter in my measure so i can have it all show in one table?
I'm thinking something like this:
% test =
if( 'xyz'$item name = "togsett",
DIVIDE(Divide([Number of items], 4) , [$ Profit]),
DIVIDE([Number of items], [$ Profit]))
 
This is wrong since the if statement can't use the true value as a column value.
Any other suggestions on how to do this?
 
Thanks!
1 ACCEPTED SOLUTION
saraMissBI
Resolver I
Resolver I

Hi @Anonymous 

I suggest you create a calculated column and put the formula you have as it will accept it or create a second measure for that special case and work with two measures. If anyone has a better solution, I would be curious to know

If my reply helps please give kudos 🙂

Thanks!

View solution in original post

1 REPLY 1
saraMissBI
Resolver I
Resolver I

Hi @Anonymous 

I suggest you create a calculated column and put the formula you have as it will accept it or create a second measure for that special case and work with two measures. If anyone has a better solution, I would be curious to know

If my reply helps please give kudos 🙂

Thanks!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Users online (1,775)