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 want to calculate the average of the Values if the Parameter field is "Gross Profit" else calculate the sum of the Values, which is like shown below;
Net = IF(POC[Parameter] = "Gross Profit", AVERAGE(POC[Value]), Sum(POC[Value]))
But Power Bi doesn't allow me to create a measure with my expression. What wrong I am doing here?
any help is appreciated
thanks
Solved! Go to Solution.
hi, @Anonymous
You could use SELECTEDVALUE Function in you formula as below:
Net = IF(SELECTEDVALUE(POC[Parameter]) = "Gross Profit", AVERAGE(POC[Value]), Sum(POC[Value]))
Result:
Basic data
Best Regards,
Lin
hi, @Anonymous
You could use SELECTEDVALUE Function in you formula as below:
Net = IF(SELECTEDVALUE(POC[Parameter]) = "Gross Profit", AVERAGE(POC[Value]), Sum(POC[Value]))
Result:
Basic data
Best Regards,
Lin
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.