Forum Discussion
Arnault_
Resolver III
5 years agoMdxScript(Model) / Calulcation error in (...)
Hi All, I have created several mesures to define a confidence interval for my data. The measures seem to work fine when I use the "card" visual. When I try to use a "table" visual, I get that error...
- 5 years ago
Finally, I have tried the following and it works (it seems).
Selling price - conf. level 95% = VAR Alpha = ( 1 - 0.95 ) VAR Size = CALCULATE ( COUNTROWS ( DISTINCT ( 'FACT Order'[packing_line_id] ) ), FILTER ( 'FACT Order', 'FACT Order'[selling price] <> 0 ) ) VAR SDev = [Selling price (Std Dev)] VAR Result = CONFIDENCE.NORM ( Alpha, SDev, Size ) RETURN IF ( SDev > 0, Result, BLANK () ) - 5 years ago
Hi Arnault_,
Congratulations, my idea is also like: IF ( SDev > 0, Result, BLANK () )
Best Regards,
Link
Arnault_
Resolver III
5 years agoOk, that's the problem. I thaught that we could handle this issue. If one of the argument is not matching, why isn't it possible to get an alternative output which in that case could be "blank" as I suggested.
Something like:
If [Selling price (Std Dev)] ≤ 0, then blank(), otherwise [Selling price - conf. level 95%].
Arnault_
Resolver III
5 years agoFinally, I have tried the following and it works (it seems).
Selling price - conf. level 95% =
VAR Alpha = ( 1 - 0.95 )
VAR Size =
CALCULATE (
COUNTROWS ( DISTINCT ( 'FACT Order'[packing_line_id] ) ),
FILTER ( 'FACT Order', 'FACT Order'[selling price] <> 0 )
)
VAR SDev = [Selling price (Std Dev)]
VAR Result =
CONFIDENCE.NORM ( Alpha, SDev, Size )
RETURN
IF ( SDev > 0, Result, BLANK () )- v-xulin-mstf5 years ago
Community Support
Hi Arnault_,
Congratulations, my idea is also like: IF ( SDev > 0, Result, BLANK () )
Best Regards,
Link