Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Simple Question

Hi Guys:

I have a very simple question but not able to get the answer hope that you guys can help.

In Qlikviw when we select the Year, Month and Day for sale we will be getting the transaction for that particular day. For example: - Year 2011 Month 8 and Day 8 we will get the transaction $200.

If we want the sale from 1-8 of August which is the beginning of the month to the selected day. How can I do that?

Sorry for such a simple question and hope that the solution will be simple too by the way I can not use the set analysis function.

Thanks Guys

25 Replies
Highlighted
Partner
Partner

Simple Question

hey

simple Question

cant the user just select days 1-to 8

that will give you the sum

then you can create a varaible

vMaxDate : =max(DateField)

and put another expression :

Sum(if(DateField=$(vMaxDate),Transactions)) to get The Sales in The maxium Date

Highlighted
Not applicable

Simple Question

Hi Baram:

Thanks for your quick reply.

The old report work like this:-

When the user selection a particular date e.g. 8/8/2011 the figure will show 1-8 /8/2011 the sum for 1 to 8.

The vMaxDate : =max(Transdate)

Will have to be written in the edit script right.

And the Sum (if (DateField =$(vMaxDate), Transactions))

Will have to in the Expression right?

I am very new to Qlikview.

Thanks again Baram

Highlighted
Partner
Partner

Simple Question

hei

can you post a sample data

this way it'll be easy to understnad and answer all the questions

Highlighted
Not applicable

Simple Question

but rich,

The set expression for transaction calculation need to be generic rite?

That is if no date as such is selected ..say, only year 2011 and month 8 is selected..do you expect to see the aggregated sum of transactions for the month 1 to 8 ?

Highlighted
Not applicable

Simple Question

Hi,

You can do this using set analysis expression. Create two variables as follows,

1. v_Start_Date - Start date of the selected year month (01-Aug-2011)

2. v_End_Date - selected date (08-Aug-2011)

Use the following expression in the calculation,

[code]

SUM($<[DateField] = {">=$(=$(v_Start_Date))<=$(=$(v_End_Date))"}>Transactions)

[/code]

This will give you the sum of the transactions from the start date of the month till the selected date. Hope this helps

Highlighted
Not applicable

Simple Question

Hi Haneesh:

I am not able to use set analysis because I am using qlikview 7.5.

Qlikview 7.5 does not support set analysis.

Hi Sircute:

Even if the user select say year 2011 and month 8 the user must also select day of the month. Once selected the Year, Month and Day. The report will show the date transaction and not that day transaction. I am not sure is that call Month to Date.

Hi All:

Here I the sample:-

Hope that it makes sense.

Highlighted
Not applicable

Simple Question

Sorry guys I think the update is no helpful at all.

I will give the example as below:-

                      Crate To(+) Crate From

1/8/2011             5                   10

2/8/2011             20                  20

3/8/2011             30                  40

If user chose date 1/8/2011 the Crate To and Crate From will show 5 and 10

But if user choose 2/8/2011 To and Crate From should show 25 and 30.

If user choose 3/8/2011 To and Crate From should show 55 and 70.

But Qlikview only show 20 and 20 which is that day transaction on 2/8/2011

And 30 and 40 for 3/8/2011.

I know using set analysis is easy to get it right but I am not able to use Set Analysis as I am using Qlikview 7.5.

Thanks all for your kind help.

Highlighted
Specialist II
Specialist II

Simple Question

Hi ,

If ur tableA is having columns Dates,Crate to,Crate from

Create another table like

Tableb:

Load Dates as Dates1  resident tableA ;

Now show this Dates1 column in the list box for the selection and in the chart

Give expression like

sum(if( Dates >= monthstart(Dates1) and Dates <= max(Dates1) , Crate to)

sum(if( Dates >= monthstart(Dates1) and Dates <= max(Dates1) , Crate from)

Now as your column  Dates1 is not related to anything it will be passed as values for the

Condition u are giving

Hope this solve ur issue

Highlighted
Not applicable

Simple Question

Hi Richard,

I agree with qliksus's, solution on this, though the expression would need a little tweaking... if the user selects more than one dat.. the expression wont work.

the following expression would display correctly

sum(if( Dates >= monthstart(max(Dates1)) and Dates <= max(Dates1) , Crate to)

sum(if( Dates >= monthstart(max(Dates1)) and Dates <= max(Dates1) , Crate from)

we'll have to use the max function under monthstart() so as to select the maximum of the selected date.

Mind you, this might display some value even if there are no selected date.. but for that you can set a calculation condition for the chart, like "GetSelectedConut(Dates1)>0"

Rgrds,

Abhinava