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
I attempted multiple measures to get the results i need. I can do either SUM or AVERAGE but not both. Where am i going wrong?
Solved! Go to Solution.
Hi @ybicalways79
Please try
FormatMetric OperationalSales =
VAR Val =
SUM ( SalesData[Value] )
VAR Ave =
AVERAGE ( SalesData[Value] )
RETURN
SWITCH (
SELECTEDVALUE ( SalesData[Attribute] ),
"Overall Sales", FORMAT ( Val, "$#,##0;($#,##0)" ),
"Overall Conversion (%)", FORMAT ( Ave, "0.0%" ),
"Overall Margin (%)", FORMAT ( Ave, "0.0%" ),
"Overall Lookup (Ct.)", FORMAT ( Val, "0" )
)
Hi @ybicalways79
Please try
FormatMetric OperationalSales =
VAR Val =
SUM ( SalesData[Value] )
VAR Ave =
AVERAGE ( SalesData[Value] )
RETURN
SWITCH (
SELECTEDVALUE ( SalesData[Attribute] ),
"Overall Sales", FORMAT ( Val, "$#,##0;($#,##0)" ),
"Overall Conversion (%)", FORMAT ( Ave, "0.0%" ),
"Overall Margin (%)", FORMAT ( Ave, "0.0%" ),
"Overall Lookup (Ct.)", FORMAT ( Val, "0" )
)
Thank you! I was so close on this one!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 5 | |
| 5 | |
| 5 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 15 | |
| 12 | |
| 10 |