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

How I can restrict the results of a dimension in a pivot table ?

Hi everyone,

I have a pivot table object on my dashboard with 2 dimensions: Country name and Month-Year.

So for example, the table looks like this.

CountryMonth-Year

Total sales

BrazilOct-2015

150,000

BrazilNov-2015175,000
BrazilDec-2015210,000

The problem is I only want to display the latest month-year figure (Dec-2015) for a country in the example above. Obviously I can do this manually by selecting a Month-Year by clicking on a date, but is there any way I can apply set analysis to a dimension (Month-Year) to restrict what rows are displayed automatically?

Or can I only do this in the script ?

Thanks

MV

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

For same, create a monthnumber at script like this?

Year*12+month(Date) as Month

Then use my above expression

View solution in original post

5 Replies
Anonymous
Not applicable
Author

may be replacing your Total Sales expression with this?

=sum({<Month={'=$('=max(Month)')'}>} Sales)

sunny_talwar

You can restrict the dimension by applying set analysis to your expressions:

Assuming you have Sum(Sales), change it to -> Sum({<Month-Year = {"$(=Date(Max(Month-Year), 'MMM-YYYY'))"}>}Sales)

Anonymous
Not applicable
Author

For same, create a monthnumber at script like this?

Year*12+month(Date) as Month

Then use my above expression

shair_abbas
Partner - Creator
Partner - Creator

Hei hope this work

calculated dimension will be   if(Month-Year=month(Today())&'-'&Year(Today()),Month-Year,null())

and check suppress when Value is Null in dimension Tab. 

Not applicable
Author

Many thanks Balraj