Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Tenuki
Contributor III
Contributor III

Filter the values on a table

Hello, 

I have create a top 5 items by % margin.

I get this result :

Item           %Marg       Revenue2025     Revenue2024

Item 1        1050 %       1050             1

Item 2        300 %          9                   3

...
I would like to filter revenue, in order to display the top 5 items witch have a revenue2 > 1500 for instance. 

I try data manipulation but it didn't work. 

My revenue mesure look like this :

sum({<YearRevenue={$(=Num(YEAR(Today())))}>} Revenue)


Many thanks for your help

Labels (2)
1 Solution

Accepted Solutions
robert_mika
Master III
Master III

You can define your values in script and then use as dimension

LET vCurrentYear = Year(Today());

RevenueTable:
LOAD
*,
IF(YearRevenue = $(vCurrentYear), Revenue, 0) AS RevenueThisYear
FROM [YourDataSource];

AggregatedRevenue:
LOAD
Sum(RevenueThisYear) AS TotalRevenueThisYear
RESIDENT RevenueTable;

 

 

The add to your main table with a join

View solution in original post

2 Replies
robert_mika
Master III
Master III

You can define your values in script and then use as dimension

LET vCurrentYear = Year(Today());

RevenueTable:
LOAD
*,
IF(YearRevenue = $(vCurrentYear), Revenue, 0) AS RevenueThisYear
FROM [YourDataSource];

AggregatedRevenue:
LOAD
Sum(RevenueThisYear) AS TotalRevenueThisYear
RESIDENT RevenueTable;

 

 

The add to your main table with a join

Tenuki
Contributor III
Contributor III
Author

Many thanks !