# App Development

cancel
Showing results for
Did you mean:
Creator

## how to use a drilldown dimension in a measure

I have a line chart with 1 measure and 2 dimensions.  One of my dimensions is a master dimension (a drill-down dimension).  I want to use it in my measure.  However, I don't see it available when building measures.  So, I don't think it's possible (at least, not directly).  Is there a work-around for this?

For reference, here are my dimensions and measure:

dimension 1 (drill-down): Create Date Drilldown: [Create Date Month-Year] \ [Create Date]

dimension 2: [Change Request Type]

measure: Percentage of Tickets Caused by Changes:

```Count(
{
\$<[Caused by Change Request?] = {'Yes'}>
}
[Ticket ID]
)
/
Count(
Total <[Create Date Month-Year]>
[Ticket ID]
)```

*Note: The Total expression in the denominator of my percentage calculation allows me to count all tickets in each month.

Labels (2)

• ### Drilldown

1 Solution

Accepted Solutions
Partner

You can use GetCurrentField function in QlikView directly to get the field name from cycle group or drill down dimension but not in Qlik Sense.
The work around is by variable. In your case, set up a variable like this (remember to have equal sign in the front):

=if(GetSelectedCount([Create Date Month-Year])=0,
'[Create Date Month-Year]',
'[Create Date]'
)

Then use the variable in your expression:

Count(
Total <\$(VariableName)>
[Ticket ID]
)

Partner

You can use GetCurrentField function in QlikView directly to get the field name from cycle group or drill down dimension but not in Qlik Sense.
The work around is by variable. In your case, set up a variable like this (remember to have equal sign in the front):

=if(GetSelectedCount([Create Date Month-Year])=0,
'[Create Date Month-Year]',
'[Create Date]'
)

Then use the variable in your expression:

Count(
Total <\$(VariableName)>
[Ticket ID]
)