Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
rapradha
Contributor
Contributor

maximum between dates row wise calculation

Hi ,

When i am trying to calculate max between 3 dates ,its not populating correctly as its only considering the first row not the second and third.

Example:In the rowwisemax.png file the max between the 3 dates(checkentered,issue,and createdate) is claimtransaction maxdate.

The Logic used to calculate max inside the script level is

BridgeMapping:

Mapping Load DISTINCT

"DIM Claim Transaction Header Key",

"DIM Claim Payment Check Key"

RESIDENT BridgeClaimPaymentCheckTransaction;

CheckIssueDateMapping:

MAPPING LOAD

"DIM Claim Payment Check Key",

Date(Floor("Check Issue Datetime")) As "Check Issue Date"

FROM [lib://$(vQvdFolder)/DIMClaimPaymentCheck.qvd]

(qvd);

CheckEnterDateMapping:

MAPPING LOAD

"DIM Claim Payment Check Key",

Date(Floor("Check Entered Datetime")) As "Check Entered Date"

FROM [lib://$(vQvdFolder)/DIMClaimPaymentCheck.qvd]

(qvd);

Unqualify *;

TransactionDate:

LOAD *,

Date(Monthstart(ClaimTransactionMaxDate),'YYYYMM') as MaxmonthYear;

Load "DIM Claim Transaction Header Key",

Date(Floor(RangeMax(Num(CheckIssueDate), Num(CheckEnterDate),  Num("Claim Transaction Create DateTime")))) AS ClaimTransactionMaxDate;

LOAD

*,

ApplyMap('CheckIssueDateMapping', BridgeDimKey) AS CheckIssueDate,

ApplyMap('CheckEnterDateMapping', BridgeDimKey) AS CheckEnterDate;

LOAD

DISTINCT "Claim Transaction Create DateTime",

"DIM Claim Transaction Header Key",

ApplyMap('BridgeMapping', "DIM Claim Transaction Header Key", 'NA') AS BridgeDimKey

//FROM [lib://$(vQvdFolder)/FACTClaimTransactionDetail.qvd]

//(qvd);

RESIDENT [Master FACT Temp];

DROP table [Master FACT Temp];

//unqualify *;

but when we exclusively take this Date(Floor(RangeMax(Num(CheckIssueDate), Num(CheckEnterDate),  Num("Claim Transaction Create DateTime")))) inside Qliksense table as an measure its working correctly and showing 4/2/2018 as max date.


Can Anyone please suggest how does Qlik reacts in row wiise calculations.

0 Replies