Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All, I need help on this below set analysis.
All I need is for few of the column I need to show "PASS" or "Fail" based on Metricvlaue .
If any of the value contains "Fail" I need to show "Fail" only.else remaining values. somehow it is not working.
if(count(
{<MetricName={'M1','M2','M3','M4'},
MetricIndexvlaue={'FAIL'},MetricIndexPeriod = {'$(=$(v_previous_month))'}>}Metricvlaue)>0,'Fail','PASS'),
sum({<MetricPeriod = {'$(=$(v_previous_month))'}>}Metricvlaue)
/count({$<MetricPlant-={'M6'}>}distinct MetricPlant)
Please attach sample qvw.
MetricID,Metricvalue,Matericperiod
M1,PASS,JUN2017
M1,PASS,MAY2017
M2,10,JUN2017
M2,20,MAY2017
M3,30,JUN2017
M3,40,MAY2017
M4,PASS,JUN2017
M4,FAIL,MAY2017
Here for M1 AND M4 need to show "fail" even if there is Fail.else "Pass". also sum(MetricValue) for remaining metricIDs
Hope this can give you idea
Your if condition ended here, what is the part in red below?
if(count(
{<MetricName={'M1','M2','M3','M4'},
MetricIndexvlaue={'FAIL'},MetricIndexPeriod = {'$(=$(v_previous_month))'}>}Metricvlaue)>0,'Fail','PASS'),
sum({<MetricPeriod = {'$(=$(v_previous_month))'}>}Metricvlaue)
/count({$<MetricPlant-={'M6'}>}distinct MetricPlant)
Hi Sunny,
Its kind of MetricName-={'M1','M2','M3','M4'} Means am excluding the other Metrics. Because other metrics will have the numeric values
Hi its my original expression
if(v_set_reset=0 and GetSelectedCount(MetricIndexPeriod)=0,
IF(count({<Pvt_MetricName={'M1','M2','M3','M4'},
MetricIndexvlaue={'FAIL'},MetricIndexPeriod = {'$(=$(v_previous_month))'}>}MetricIndexvlaue)>0,'Fail','PASS',
(sum({<MetricIndexYear = {'$(=$(v_previous_year))'}>}MetricIndexvlaue)/12
),IF((v_set_reset=1 or v_set_reset =0) and GetSelectedCount(MetricIndexPeriod)>0,
count({<Pvt_MetricName={'M1','M2','M3','M4'},
MetricIndexvlaue={'FAIL'},MetricIndexPeriod = {'$(=$(v_previous_month))'}>}MetricIndexvlaue)>0,'Fail','PASS'),sum(MetricIndexvlaue)))