Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Selection causes problem with dimension in Minichart

Hi,

I use Set Analysis to calculate the OTD based on the [Fiscal Year] and [Fiscal Quarter] that the user selects.

1-(count({<[OTD Promise Late]={'100.00'},[Fiscal Year]={"$(=GetFieldSelections([Fiscal Year]))"},[Fiscal Quarter]={"$(=GetFieldSelections([Fiscal Quarter]))"}>}counterOTDp)/count({<[Fiscal Year]={"$(=GetFieldSelections([Fiscal Year]))"},[Fiscal Quarter]={"$(=GetFieldSelections([Fiscal Quarter]))"}>}counterOTDp))

I also want to show the historic OTD per quarter as a Minichart in the same Straight Table

1-(count({<[OTD Promise Late]={'100.00'},[Fiscal Year]={"$(<GetFieldSelections([Fiscal Year]))"},[Fiscal Quarter]={"$(<GetFieldSelections([Fiscal Quarter]))"}>}counterOTDp)/count({<[Fiscal Year]={"$(<GetFieldSelections([Fiscal Year]))"},[Fiscal Quarter]={"$(<GetFieldSelections([Fiscal Quarter]))"}>}counterOTDp))

The Minichart is plotted against a dimension called [Fiscal YearQuarter]

But I only get one value with this Set Analysis. I think the reason is that [Fiscal YaerQuarter] is reduced based on the [Fiscal Year] and [Fiscal Quarter] that the user selected.

Is there any way of solving this? Or have I made some other error?

Thanks in advance!

BR,

Jonas

3 Replies
pover
Luminary Alumni
Luminary Alumni

Like you say with your set analysis you reduce the values in the minichart according to the selections of the user and if they select a year and a quarter you are only going to see one data point. Try erasing the selections in set analysis like in the following example.

count({<[Fiscal Year]=,[Fiscal Quarter]=>}counterOTDp)

Regards.

Not applicable
Author

Thanks Karl,

Your suggestions works. With your expression I get all the data points displayed in the minichart.

Is there anyway of writing the expression so that I can get the YearQuarter up-to the current selection?

Today I have data per Quarter from 2007 to 2010. If the user selects Q2-2009 I want the minichart to display

2007Q1
2007Q2
2007Q3
2007Q4
2008Q1
2008Q2
2008Q3
2008Q4
2009Q1

BR,
Jonas

pover
Luminary Alumni
Luminary Alumni

Use set analysis to create a range to data. For example:

[Fiscal Year]=, [Fiscal Quarter]=, [Fiscal YearQuarter]={"<=$(#=quartername(max(Date)))"}

You still have to clear the selections of Year and Quarter that the user has made. The tricky part is the range in set analysis because the formula the range is based on "quartername(max(Date)))" has to be the same format as Fiscal YearQuarter and you will have to play with this part of the formula to make it work.

I recommend playing with it in a text object first and then when you have to correct value copy it to the minichart.

Regards.