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

putting a condition for the dimension in a table

Hi all,

What I want to do is the following:

I'm comparing things btw today and today-7, as it's abvious, if I reload in 17h, I will have the values of today untill 17h but all the values of today-7 since all the data already exists in the source.

Instead, I want my table to stop at the quarter 17h (the last charged date); in this case exactly at 16h30-16h45.

Capture.PNG

I've tried to use this expression here which in different graphs will bring only the data before th16h43 (the last charged date of today).

Capture.PNG

But, that didn't affect a thing !

What to do?

5 Replies
sunny_talwar

Not sure I completely understand. Are you hiding a complete dimension based on time of the day you are looking at this report?

OmarBenSalem
Author

I have to dates I'm working with:

today and today-7 which I've put in variables (vDayMax to refer to today and vTodayMin)

Here are my expressions for the "CA" for example:

cumul-CA( J )

RangeSum(above(Sum({$<[Day of date]={"$(=$(vDayMax))" }>} Montant_Vente),0,RowNo()))

and

Cumul-CA (J-7)

RangeSum(above(Sum({$<[Day of date]={"$(=$(vDayMin))" }>} Montant_Vente),0,RowNo()))


My Dimension is quarter of hour :


=time(QHour,'hh:mm')&'-'&Time(QHour +'00:15','hh:mm')



If I reload today a 16h43, I will have data till QHour 16h30-16h45 and 0 for the rest of the day, while I'll be having results in the today-7 because all the data already exists !



Capture.PNG

I want the table to stop in 16:30-16:45, the last QHour charged in today.

In other Graphs, this is what I do to stop in the last charged day

(Sum({$<[Day of date]={"$(=$(vDayMin))" },Time={'<=$(=Time(vMaxDate2))'}>}Montant_Vente))

with vMaxDate2 as calculated variable which contains the last updated date, for example : 05/04/2016 18:35:32.

I want to do the same thing in the table, I tried to place a condition like this :

Capture.PNG

But it didn't affect the table.

Hope it's all clear now !

sunny_talwar

The place where you are adding the condition is to show/hide a dimension. You will have to use this condition as an if statement or set analysis within your dimension or expression. I would prefer using it in the expression as set analysis, but to get the exact expression, it would be easier if I can have a sample to work with. Else its all guess work

OmarBenSalem
Author

Yes, it worked with a set analysis as you mentionned; here's the expression of one of the columns:

Sum({$<[Day of date]={"$(=$(vDayMax))" },Time={'<=$(=Time(vMaxDate2))'}>}Montant_Vente)

result :

Capture.PNG

sunny_talwar

So you have the issue resolved, right?