Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Not applicable

Min Max Date function in Qliksense

Dear Friends,

I have a sales history table.

I would like to filter max Transaction date for each material,

There are many fields but I am focusing only on Material and Trasaction date.

Currently I am using following formula

Material

Max(TransactionDate) as MaxTransDate

All other fields are commented.

owever, there is error and i donot get the desired result.

May be you can tell me how to use the max function.

Tags (1)
4 Replies

Re: Min Max Date function in Qliksense

Did you use Group by with this expression.

Ex:-

        Load

        Material,

Max(TransactionDate) as MaxTransDate

        From TableName Group BY Material;

mostwanted123
Contributor

Re: Min Max Date function in Qliksense

Try this,

Load

Max(TransactionDate) as MaxTransDate

        From TableName ;

Regards,

Pratik Bhor

Not applicable

Re: Min Max Date function in Qliksense

Anand,

Thanks for your Tip, I was not using Group by.

Now it is giving me desired results.

Cheers.

Raaj

Not applicable

Re: Min Max Date function in Qliksense

Dears,

I have a table showing Inventory per material, last 6 month sales , previous month sales. This is working fine.

Now user want to see last Transaction date. That's why i asked earlier how to get max date per material.

I am using following script.

NoConcatenate
DailyInventory:

Load *
Resident DailyInventory_tmp;

Concatenate(DailyInventory)
Load *
Resident SalesPV_6Months;


Concatenate(DailyInventory)
Load *
Resident SalesPV_1Month;


Concatenate(DailyInventory)
Load *
Resident MaxTransactionDate;


DROP Table DailyInventory_tmp;
DROP Table SalesPV_1Month;
DROP Table SalesPV_6Months;
DROP Table MaxTransactionDate;

See below result Max Transaction date is not coming in same line but in the second line.

Seems I am doing soemthing wrong.

   

MaterialMaxDateProduct(InventoryQuantity)(P6M_SalesQty)(PM_SalesQty)
000000000000105035             -178.965257.87251.710
00000000000010503529.09.2017000
Community Browser