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

set analysis max year with measure greater than 0

hi guys,

I need to create an expression that returns the total max year where the measure A greater > than 0 aggr by dimension.

my measure A:

count({<ColumnB-={"0"}, flag={'1'}>} distinct ColumnC)

I'm trying to do;
aggr(max({<ColumnC= {"=count({<ColumnB-={"0"}, flag={'1'}>} distinct ColumnC)>0"}>} total year),dimension), but this return always the max year, and the max year has measure A = 0

So, for some scenario the expected result will be:
Year mont Dimension ColumnC
2024 Mar  A  10
2024 Mar  B  0
2024 Feb   A 8
2024 Feb   B 5

So I need to show 2024, Mar and X to Dimension A
                               2024, Feb and X to Dimension B, because the max 2024 Mar equal 0




After that, I will compare this result and mark the year that equals max year as X, so I need the total year

Labels (4)
0 Replies