Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I am geting the error above for these codes. Where am i going wrong?
Dynamic Forecast measure =
SWITCH(
SELECTEDVALUE(Dynamic_Selection_Period[Period]),
"Prediction",
"Forecast: " &
IF(
ISERROR([Time Metric Calculations FCST]),
"Error",
ROUND([Time Metric Calculations FCST], 2)
) &
" (" &
IF(
ISERROR([Time Metric Calculations CY Forecast] - [Time Metric Calculations FCST]),
"Error",
ROUND(([Time Metric Calculations CY Forecast] - [Time Metric Calculations FCST]), 2)
) &
", " &
IF(
ISERROR(([Time Metric Calculations CY Forecast] - [Time Metric Calculations FCST])/[Time Metric Calculations FCST]),
"Error",
ROUND(([Time Metric Calculations CY Forecast] - [Time Metric Calculations FCST])/[Time Metric Calculations FCST], 2)
) &
"%)",
"MTD",
"Forecast: " &
IF(
ISERROR([Time Metric Calculations FCST]),
"Error",
ROUND([Time Metric Calculations FCST], 2)
) &
" (" &
IF(
ISERROR([Time Metric Calculations CY] - [Time Metric Calculations FCST]),
"Error",
ROUND([Time Metric Calculations CY] - [Time Metric Calculations FCST], 2)
) &
", " &
IF(
ISERROR(([Time Metric Calculations CY] - [Time Metric Calculations FCST])/[Time Metric Calculations FCST]),
"Error",
ROUND(([Time Metric Calculations CY] - [Time Metric Calculations FCST])/[Time Metric Calculations FCST], 2)
) &
"%)"
)
Dynamic Forecast measure = SWITCH(SELECTEDVALUE(Dynamic_Selection_Period[Period]),"Prediction","Forecast: " & ROUND([Time Metric Calculations FCST],2) & " (" & ROUND(([Time Metric Calculations CY Forecast] - [Time Metric Calculations FCST]),2) & ", " & ROUND(([Time Metric Calculations CY Forecast] - [Time Metric Calculations FCST])/[Time Metric Calculations FCST],2) & "%)","MTD","Forecast: " & ROUND([Time Metric Calculations FCST],2) & " (" & ROUND([Time Metric Calculations CY] - [Time Metric Calculations FCST],2) & ", " & ROUND(([Time Metric Calculations CY] - [Time Metric Calculations FCST])/[Time Metric Calculations FCST],2) & "%)")
Judging from your error message, the problem is with your Range function.You use the ROUND function to round the result to two decimal places. This should be fine, but you need to make sure that the rounded value is of the numeric type.
If the above suggestions don't help you solve your problem, please provide detailed sample pbix file and the results you expect.So that I can help you better. Please remove any sensitive data in advance.
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The measures may be BLANK() rather than erroring out.
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
11 | |
9 | |
6 |