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

Announcements
Posting on Qlik Community is temporarily paused. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
palo173
Contributor III
Contributor III

Ignore filter but not Variable base on filter

Hello,

in set analysis I want to ignore active filter but not variable base on filter.

I try to ignore Dealer, but Dealer define variable vDistrictDealer. Do you have same idea for this?

Max(Aggr(Sum({< Fakt = {'Def'}, Year = {"$(=Year(vMaxDatZap))"}, [District] = {'$(vDistrictDealer)'}, Dealer= >}[#Reg]), [District],[Brand]))

Thank you

Labels (3)
12 Replies
palo173
Contributor III
Contributor III
Author

I attached excel with dummy data.

 

 

Test_1:
LOAD
    Id
    , Fakt
    , Year
    , Dealer
    , District
    , Brand
    , Reg
FROM [lib://Data_sources\Test\Source.xlsx]
(ooxml, embedded labels, table is Sheet);


Test_2:
LOAD
    Dealer
    , District_dealer
FROM [lib://Data_sources\Test\Source.xlsx]
(ooxml, embedded labels, table is Sheet);

 

 

Definition variable: vDistrictDealer=District_dealer

palo173_1-1732196775104.png

Measure:

 

Max(Aggr(Sum({< Fakt = {'Def'}, Year = {'2024'}, [District] = {'$(vDistrictDealer)'}, Dealer= >}[Reg]), [District],[Brand]))

 

And result should be 50 not 30

palo173_0-1732196718444.png

Thank you

palo173
Contributor III
Contributor III
Author

Any ideas, anyone? @Qrishna ?

I attached excel with dummy data.

Thank you

Qrishna
Master
Master


Try this: 

Sum({$<Fakt = {'Def'}, Year = {'=$(vMaxDatZap)'}, Dealer=, District = P({1<District={"$(=FirstSortedValue(Aggr(District, District), Id))"}>} District) >} Reg) 

where vMaxDatZap = Max(Year)