Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Bhushan1
Contributor II
Contributor II

How to create a virtual row in script

Hi All,

I have a country and measure and placing these objects in a table. In my country column I have 3 rows (IN, US and UK), but my requirement is need to show additional row which is a combination IN+US. How to achieve this requirement with out effecting other tables like gender table. Please find the attached qvf file for your reference.

CountrySum(measure)
IN100
UK300
US200
IN+US300
Totals600

 

Note: even after adding new row (IN+US) totals should show as actual value i;e IN+UK+US=600.

Regards,

Bhushan

2 Replies
tresesco
MVP
MVP

Try using dimensionality() like:

1.PNG

2.PNG

Bhushan1
Contributor II
Contributor II
Author

Hi Tresesco,

 

Thanks for your reply. I have tested your post, it's working with dimensionality(), but I need to add some extra further requirement to my post.

 

I have two filter panes, first filter panel contains set of filter and applied "firststate" alternate state to it. Second filter pane contains a set of filters and applied "SecondState" alternate state to it.

if you see in my previous attachment, I have placed Gender table also. Actually that gender table contains Gender dimension and 3 measures (All (which will not reflect to any filter from top filters),FirstStateSales measure will reflect only for "FirstState" filter pane alternate state filter and "SecondStateSales" measure will reflect only for "Secondstate" alternate state filter.

Note: this gender table should not consider newly created virtual row while calculating those 3 measures because of that i have added condition flag={0} in set analysis.

Please find the attached modified qvf and help me on this.

Regards,

Bhushan