Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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, @Bhaveshp
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, @Bhaveshp
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
97 | |
75 | |
63 | |
53 |
User | Count |
---|---|
139 | |
100 | |
95 | |
85 | |
63 |