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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
SalvatoreSteccato
Contributor
Contributor

Code Breaking Values ​​Counting

Hi, we have the data series below and we would like to count the breakout changes of one of the two fields Forma/Diam

SalvatoreSteccato_0-1742813584023.png

Result we would like in this case is 7

 

Labels (3)
2 Replies
jpenuliar
Partner - Specialist III
Partner - Specialist III

Peek Function :
https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/InterRecor...


[tempA]:
Load *, Autonumber(Forma&'|'&Diam) as key
inline [
Data, Forma, Diam, conteggio
01/01/2025, TO, 10, 1
01/01/2025, TO, 18, 1
02/01/2025, TO, 18, 1
03/01/2025, QU, 10, 1
03/01/2025, QU, 15, 1
04/01/2025, TO, 20, 1
04/01/2025, TO, 18, 1
04/01/2025, TO, 10, 1
04/01/2025, TO, 10, 1
];
 
 
NoConcatenate
[tempB]:
Load *,
If(key=Peek(key)  
, 0,1 ) as "Logic"    
Resident [tempA]
;
 
Drop Table [tempA];

 

SalvatoreSteccato
Contributor
Contributor
Author

Thanks for your answer.

The solution you proposed only works when loading the script and not dynamically when changing the filters within the app...is there a way to do this?