# New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
Partner

## Adhoc report with multiple dimensions

Hi All,

Is it possible to create Adhoc report with multiple dimensions.

Thanks & Regards,

Lakshman

2 Solutions

Accepted Solutions
Highlighted
MVP

## Re: Adhoc report with multiple dimensions

In chart Calculated condition(In General tab) put below expression

=(GetSelectedCount(Supply)>0 or GetSelectedCount(Time)>0) and GetSelectedCount(Measure)>0

For Supply Dimensions in Chart, check 'Enable Condition' and put below expression for each dimension

=if(wildmatch(concat(GetFieldSelections(Supply),','),'*Supply 1*'),1,0) - For Supply 1 Dimension

For Time Dimensions in Chart, check 'Enable Condition' and put below expression for each dimension

=if(wildmatch(concat(GetFieldSelections(Time),','),'*Year*'),1,0)

For Measure Dimensions in Chart, check 'Enable Condition' and put below expression for each dimension

=if(wildmatch(concat(GetFieldSelections(Measure),','),'*Avg*'),1,0)

Note: Apply conditional for each dimension using above expressions

Highlighted
MVP

## Re: Adhoc report with multiple dimensions

Please mark the answer as correct if any suggestion helped else post the solution and mark it as correct so that others can refer it for same problem

12 Replies
Valued Contributor II

Highlighted
Partner

## Re: Adhoc report with multiple dimensions

Hi ,

Thanks for replay,

I have checked link, but here using single dimension only.

but i have 3 dimensions and one measure.

if using one dimension and one measure then use  getselectedcount(Dimension)>0 and getselectedcount(Measure)

but if i take 3 dimensions how to write the code.

I have used

getselectedcount(Dimension 1)>0 or getselectedcount(Dimension 2)>0  and getselectedcount(Measure) .

Please suggest me how to achieve this scenario.

is there any possibility can you share example.

Thanks & Regards,

Lakshman

Highlighted
Contributor

## Re: Adhoc report with multiple dimensions

Are you able to post an example of your report?

While we teach we learn
Highlighted
Partner

## Re: Adhoc report with multiple dimensions

Hi ,

my requirement is i have 2 dimension and 1 measure.

if i select Dimension 1 and measure then automatically display the dimension 2 also.

if i select dimension 2 then only display the data.

Please suggest me how to achieve this scenario.

Regards,

Lakshman

Highlighted
MVP

## Re: Adhoc report with multiple dimensions

Not completely understand what do you want to achieve. Can you please put one example?

Highlighted
Partner

## Re: Adhoc report with multiple dimensions

Hi ,

Actually we will use One dimension and One Measure to create the Adhoc report.

But my problem is to create the adhoc report with multiple dimensions.

I have table like

Supply 2 ,

Supply 3,

Month,

Quarter ,

Year,

Sales

from table.

Supply:

Supply

Supply 1,

Supply 2,

Supply 3

];

[Time period]:

Time

Year,

Quarter,

Month

];

Measures:

Measure

Sum,

Avg,

Max

];

i have create pivot table and i have taken Supply and Time period as Dimensions and Measure as Measure.

In general tab i have write getselectedcount(Supply)>0 and getselectedcount(Measure)>0

i have taken one dimension and One measure it is working fine.

i have taken two dimensions with one measure is not working properly.

GetSelectedCount(Supply)>0 or GetSelectedCount(Time period) and GetSelectedCount(Measure)>0

Please suggest me is it possible to achieve this one. if possible please suggest me how to achieve this scenario.

Regards,

lakshman

Highlighted
MVP

## Re: Adhoc report with multiple dimensions

Is it typo? your field name is Time.

(GetSelectedCount(Supply)>0 or GetSelectedCount(Time)>0) and GetSelectedCount(Measure)>0

Highlighted
Partner

## Re: Adhoc report with multiple dimensions

Hi ,

Time period is Field Name.

I have wrote same code but if i select Supply 1 and supply 2 in Supply filed and Select measure it is showing 2nd dimension values also.

my requirement is if i select the second dimension then only 2nd dimension values visible otherwise display Dimension 1 selected values and corresponding Measure values.

i have used

(GetSelectedCount(Supply)>0 and GetSelectedCount(Time)>0) and GetSelectedCount(Measure)>0

i have selected Supply, Time and Measure at least one selection then only chart will display.

if i use this code

(GetSelectedCount(Supply)>0 or GetSelectedCount(Time)>0) and GetSelectedCount(Measure)>0

if i am not selected time it is also coming.

Please suggest me is there any way to achieve this scenario.

Regards,

Lakshman

Highlighted
MVP

## Re: Adhoc report with multiple dimensions

In chart Calculated condition(In General tab) put below expression

=(GetSelectedCount(Supply)>0 or GetSelectedCount(Time)>0) and GetSelectedCount(Measure)>0

For Supply Dimensions in Chart, check 'Enable Condition' and put below expression for each dimension

=if(wildmatch(concat(GetFieldSelections(Supply),','),'*Supply 1*'),1,0) - For Supply 1 Dimension

For Time Dimensions in Chart, check 'Enable Condition' and put below expression for each dimension

=if(wildmatch(concat(GetFieldSelections(Time),','),'*Year*'),1,0)

For Measure Dimensions in Chart, check 'Enable Condition' and put below expression for each dimension

=if(wildmatch(concat(GetFieldSelections(Measure),','),'*Avg*'),1,0)

Note: Apply conditional for each dimension using above expressions