Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
cristianj23a
Partner - Creator III
Partner - Creator III

Monthly Percentage

I have a problem with the percentages.

The objective is to calculate the percentages based on the monthly total.

Captura.PNG

As it is displayed in the image.

the value 1535623.52 is the total for the month of December. This value should be in the Exp2 column.

The same logic must be repeated in each month.

please help me with this topic.

Greetings.

Attached the Qvw

https://www.linkedin.com/in/cristianjorge/
Do not forget to mark as "Accepted Solution" the comment that resolves the doubt.
1 Solution

Accepted Solutions
sunny_talwar

Try this for total

If(Dimensionality() = 2,

Sum(TOTAL <NOM_MES> {<FECHA_STOCK={"$(=DATE(NOW()-1,'DD/MM/YYYY'))"},ALMACEN={'*'} - {'290010','390010','930102'}>}STOCK_M2),

Sum(TOTAL{<FECHA_STOCK={"$(=DATE(NOW()-1,'DD/MM/YYYY'))"},ALMACEN={'*'} - {'290010','390010','930102'}>}STOCK_M2))

Capture.PNG

View solution in original post

4 Replies
sunny_talwar

Try this for total

If(Dimensionality() = 2,

Sum(TOTAL <NOM_MES> {<FECHA_STOCK={"$(=DATE(NOW()-1,'DD/MM/YYYY'))"},ALMACEN={'*'} - {'290010','390010','930102'}>}STOCK_M2),

Sum(TOTAL{<FECHA_STOCK={"$(=DATE(NOW()-1,'DD/MM/YYYY'))"},ALMACEN={'*'} - {'290010','390010','930102'}>}STOCK_M2))

Capture.PNG

vishsaggi
Champion III
Champion III

try this in your expr2

= sum(TOTAL <NOM_MES> {<FECHA_STOCK={"$(=DATE(NOW()-1,'DD/MM/YYYY'))"},ALMACEN={'*'} - {'290010','390010','930102'}>}STOCK_M2)

vishsaggi
Champion III
Champion III

Sunny I thought he said he wants to repeat this for every month not only in Dec so will adding NOM_MES is not enough? Just wondering to know.

vishsaggi
Champion III
Champion III

You are right his %ges gets weird if we do not use Dimensionality. Got it.