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

Question regarding a formula

Hello,

I'm pretty new regarding QV. I have some coding background, but still I'm not ready to code by myself. 

So far I have been working on the current script that I have (done by someonelse in the company), but I want to understand the basics first. 

The code below is the one I'm trying to understand. It aims to calculate price where ValorNetoLC is the Revenue and Peso_Neto is the weight in KG. 

Sum({<Id_Fecha={'<=$(xMaxFechaMesFin)'},TipoFCFact={'Producto Terminado'}>}ValorNetoLC_NETWR)/Sum({<Id_Fecha={'<=$(xMaxFechaMesFin)'},TipoFCFact={'Producto Terminado'}>}PESO_NETO)

The question I have here is what does this expression means <=$(xMaxFechaMesFin) doing ?? "Fecha and Mes are some variables that exist, but the xMax and Fin I can't find them.

Hope you can help me

Thanks in advance

2 Replies
pradosh_thakur
Master II
Master II

Id_Fecha={'<=$(xMaxFechaMesFin)'}

This only includes those if which are less then xMaxFechaMesFin

Have a read

https://community.qlik.com/t5/Qlik-Design-Blog/A-Primer-on-Set-Analysis/ba-p/1468344

Learning never stops.
Channa
Specialist III
Specialist III

it is variable xMaxFechaMesFin

check your variables list

and it checking 

Id_Fecha={'<=$(xMaxFechaMesFin)'}

means ID_Fecha <= xMaxFechaMesFin

Channa