Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am in deep struggling with set Analysis .
I have four input fields
GroupName
Region
Department
SINO
If I select a datafield in GroupName , Region,Department and SINO in my Pivot table only that selected line item should be calculated and rest of the values will remains same. I have achieved the above requirement. But If I ignore any of the above fields from selection its not working. for example If I select one data element from Group name, Region and ignore Department and SINO my code is not working. My code is below
=sum({1}if(wildmatch(vGroupName,'*~' & GroupName & '~*')> 0 and wildmatch(vRegionName,'*~' & RegionName & '~*') > 0 and wildmatch(vDepartment,'*~' & Department & '~*') > 0 and wildmatch(SINO ,'*~' & SINO & '~*') > 0,sales*(1.0+vSales/100.0), Sales))
in the above code
vGroupName =If(GetSelectedCount(GroupName) > 0, Concat(DISTINCT '~' & GroupName & '~', ','))
vRegionName = If(GetSelectedCount(RegionName ) > 0, Concat(DISTINCT '~' & RegionName & '~', ','))
.
.
Please help me in this .
May be use GetPossibleCount() vs. using GetSelectedCount()
=If(GetPossibleCount(SINO) > 0, Concat(DISTINCT '~' & SINO & '~', ',')) =If(GetPossibleCount(Department) > 0, Concat(DISTINCT '~' & Department & '~', ',')) =If(GetPossibleCount(GroupName) > 0, Concat(DISTINCT '~' & GroupName & '~', ',')) =If(GetPossibleCount(Region) > 0, Concat(DISTINCT '~' & Region & '~', ','))
@djaykumar wrote:If I select one data element from Group name, Region and ignore Department and SINO my code is not working. My code is below
What exactly do you mean when you ignore ....? I am not sure I understand the issue. Do you want to may be explain giving an example?
Hi Sunny,
Thank you for quick response.
Please find attachment .
Regards,
Jay
sorry attaching qlikview
May be use GetPossibleCount() vs. using GetSelectedCount()
=If(GetPossibleCount(SINO) > 0, Concat(DISTINCT '~' & SINO & '~', ',')) =If(GetPossibleCount(Department) > 0, Concat(DISTINCT '~' & Department & '~', ',')) =If(GetPossibleCount(GroupName) > 0, Concat(DISTINCT '~' & GroupName & '~', ',')) =If(GetPossibleCount(Region) > 0, Concat(DISTINCT '~' & Region & '~', ','))
Thank you Sunny,
Working perfectly
Regards,
Jay