Hi, the overall context is:
I have a bunch of titles, create variable v_countGrandTotal = count([Title])
I want to count how many titles belong to "Adults", "Clips" and "Others".
For "Others", it is divided into (Shows&Series; Movies)
First of all, I create variable to count titles which is "Adult"
v_countAdults=Count(If([Provider] InList ("ADULT01";"ADULT02";"ADULT03"); [Title]);Distinct)
A title could be not only Adult but Clips/Others (called NotAdults), for example: Title01 belongs to not only Adult but NotAdults. In this case, it should be a a Adult only. Therefore, I create variable v_TempIsAdult and v_IsAdult to classify:
v_TempIsAdult = If([Provider] InList (""ADULT01";"ADULT02";"ADULT03");"Adults";"NotAdults")
v_IsAdult = If(Count([v_TempIsAdult]) In ([Title]) > 1;"Adults";[v_STB_TempIsAdults])
Title | v_TempIsAdult | v_IsAdult |
---|---|---|
Title01 | NotAdults | Adults |
Title01 | Adults | Adults |
I create variable to count Clips and Others:
v_countClips = Count(If([v_IsAdults] = "NotAdults" And [LengthInMinutes] <= 10 And Not([Provider] InList("H01";"MA01";"EL01";"CO01));[Title]) In([Title];[Provider];[LengthInMinutes]) ;Distinct)
v_countOthers = v_countGrandTotal - v_countAdults - v_countClips
v_TempIsClip = If([v_IsAdults] = "NotAdults") Then (If ([LengthInMinutes] <= 10 And Not([Provider] InList("H01";"MA01";"EL01";"CO01";"S01"));"Clips";"Others"))
v_IsClip = If(Count([v_TempIsClips] ) In ([STB].[Title]) > 1;"Clips";[v_TempIsClip])
Title | v_TempIsClip | v_IsClip |
---|---|---|
Title05 | Clips | Clips |
Title05 | Others | Clips |
Title06 | Others | Others |
Title07 | Clips | Clips |
when i remove v_TempIsClip, #MULTIVALUE appear:
Title | v_IsClip |
---|---|
Title05 | #MULTIVALUE |
Title06 | #MULTIVALUE |
Title07 | #MULTIVALUE |
i want to eliminate #MULTIVALUE.
help me!