Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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