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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
HAmzehAF
Partner - Creator
Partner - Creator

Highest Sales

Hello,

i wanna show in a table on my sheet 
- Store -Date -Highest Sales

Highest Sales means i wanna see the max sales i have in all my data and to show one data in which store+data i have this (Highest Sales) 

can anyone help me with this? 

 

i want the table to only show one data and its the Highest Sales only 

13 Replies
Chanty4u
MVP
MVP

Try this

=If(Sum(Sales) = Max(TOTAL <Store, Date> Sales), Sum(Sales))

 

HAmzehAF
Partner - Creator
Partner - Creator
Author

@Chanty4u 
thank you for the reply but its not working im getting - - - - - - on all the data 

Dataintellinalytics
Creator
Creator

PFA, and try this. "  =Aggr(Max(Sales),Store) "

 

HAmzehAF
Partner - Creator
Partner - Creator
Author

@Chanty4u @Dataintellinalytics 

hello, 
when i use 


Max(Aggr(Sum(SALE),Date, Store))
or a anything like this i get the same store like this 

Store  Date Sales 
Test1  1-Jan 1000
Test1  2-Jan 100
Test2 1-Mar 200
Test1  2-Mar 300
Test3 6-May 500
Test1  4-Apr 340
Test2 5-Apr 535
Test3 6-Apr 355
Test4 7-Apr 530
Test1  8-Apr 420
Test1  9-Apr 425
Test7 10-Apr 564


like test1 store is showing 5 times or more... 
i wanna see it ones when its at highest ever and the stores the same thing 

test1 1/1 1000
test2 1/5 500

and soo how can i do it 

Rohan
Partner - Specialist
Partner - Specialist

Hi, 

Just switch the Max & Sum functions :

Sum(Aggr(Max(SALE),Date, Store))

See if this works.

 

Regards,

Rohan.

HAmzehAF
Partner - Creator
Partner - Creator
Author

@Rohan 
thank you for the reply ,
i already tried this but no im not getting the sum for the sales not working 

Dataintellinalytics
Creator
Creator

Hi,

In My example I assumed one date for each Store but looks like you have more than one date.

PFA snapshot. Please try the below expression.

Only(Aggr(Firstsortedvalue(Date, -Sales), Store))

HAmzehAF
Partner - Creator
Partner - Creator
Author

@Dataintellinalytics 
Hello thank you for the reply ,
i did this but my highest sales for the store "Test1" is 1000 in 1/1/2024 but I'm getting a different date for the same max sales 

plus i want the max (sum(sales) not only the max sales 

Dataintellinalytics
Creator
Creator

Please share snapshot to understand your data. 

Do you have multiple Sales for each date ? Please make sure to give complete details or proper mocked up data for the community to help.