Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello!
I need help please. I have different values in a filter, and I need to apply a measure to them. However, for some of them, this measure needs to be modified. In excel it would be easy with an IF fucntion, however I am not able to find the solution for power bi:
1. Company 1
2. Company 2
3. Company 3
Measure := Sales[Quantity] * Sales[Net Price]
For Company 2, however, I need: 0,5*(Sales[Quantity] * Sales[Net Price])
So I am able to build this fuction:
Solved! Go to Solution.
@Anonymous
Not sure what is going on at your end, but the SELECTEDVALUE function does identify the filter context in a table:
Are the columns in both the IF statement and the visual from the same table?
Proud to be a Super User!
Paul on Linkedin.
@Anonymous
Not sure what is going on at your end, but the SELECTEDVALUE function does identify the filter context in a table:
Are the columns in both the IF statement and the visual from the same table?
Proud to be a Super User!
Paul on Linkedin.
@Anonymous thanks for the answer but the problem is that I need to use a measure becasue the column does not work for the totals. It sums everything.
@PaulDBrown thanks! you were right, I was using another file for "Company", so it did not work. Now it works, but, last challenge: for totals it does not apply the different measures, do you know the logic behind the totals? Thank you so much!!!!
Proud to be a Super User!
Paul on Linkedin.
Hi!
What about if you create a new calculate column and you apply your measure to it?
Something like this:
MEASURE = IF(FILTER('YOUR TABLE';'COMPANY' = "COMPANY2");0,5*(Sales[Quantity] * Sales[Net Price]));Sales[Quantity] * Sales[Net Price])
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.