Krays23
November 21, 2019, 10:29am
1
Sorry guys having a bad day and cant remember how i get my STD Dev line to finish at the end of the ship set data set.
See photo i want the STD Dev line (Blue line) to stop at SS 162.
I was sure it was ALLSELECTED function taking into account my table filter???
Standard Deviation Line = CALCULATE([X+3σ],ALLSELECTED(‘SAP Last 40 Ship Sets (Hassan)’[Ship Set]))
Appologies in advance i know its simple
Dan
BrianJ
November 21, 2019, 1:10pm
2
@Krays23 ,
I think this should do the trick:
Standard Deviation Line =
IF(
‘SAP Last 40 Ship Sets (Hassan)’[Ship Set] <= 162,
CALCULATE(
[X+3σ],
ALLSELECTED(‘SAP Last 40 Ship Sets (Hassan)’[Ship Set])
),
BLANK()
)
Krays23
November 21, 2019, 5:19pm
3
Hi brian
It would but the ss are dynamic not always 162
Cheers
BrianJ
November 21, 2019, 5:26pm
4
@Krays23 ,
I wondered that, but without seeing the PBIX file I didn’t have more to go on. What’s the decision rule that governs when you want that line to terminate?
Krays23
November 21, 2019, 6:07pm
5
BrianJ:
Standard Deviation Line =
IF(
‘SAP Last 40 Ship Sets (Hassan)’[Ship Set] <= 162,
CALCULATE(
[X+3σ],
ALLSELECTED(‘SAP Last 40 Ship Sets (Hassan)’[Ship Set])
),
BLANK()
)
pbix attached.
Power BI Initiatives.pbix (1.2 MB)
BrianJ
November 22, 2019, 12:32am
6
@Krays23 ,
It took me a little while to figure out why ship set 162 was special, in order to set the proper filter condition, but I think I got it.
Standard Deviation Line =
VAR MaxView =
CALCULATE(
MAX( 'SAP Last 40 Ship Sets (Hassan)'[Ship Set] ),
FILTER(
ALLSELECTED('SAP Last 40 Ship Sets (Hassan)'),
[Work center] = "BFC-10"
)
)
RETURN
IF(
SELECTEDVALUE( 'SAP Last 40 Ship Sets (Hassan)'[Ship Set] ) <= MaxView,
[X+3σ],
BLANK()
)
Hope this is what you needed.