Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Pooja_QlikSense28
Partner - Contributor
Partner - Contributor

Could Get Correct value in Previous Month KPI

I have two Kpi's which displays 

1. current month outstanding in USD

Chart Expression: 

Sum({<LinkDate={">=$(MonthStart)<=($(vmaxdate))"}>}[Amount USD])/1000

 

Variables:

1. vmaxdate :   

=max(LinkDate)

 

2. MonthStart:

= Num(MonthStart($(vmaxdate)))


2. previous month outstanding in USD

Chart Expression: 

Sum({<LinkDate={">=$(vPreviousMonthStart)<=($(vPreviousMonthEnd))"}>}[Amount USD])/1000

 

Variables:

1.vPreviousMonthStart:

=num(MonthStart(AddMonths($(vmaxdate),-1)))

 

2.vPreviousMonthEnd:

=num(MonthEnd(AddMonths($(vmaxdate),-1)))

 

ISSUE:

My calculation is correct for current month and i am getting desired results also i am able to get correct previous month start and end but my sum is incorrect and when select a month from filter then i get same value in both KPI 

 

 

 

 

 

 

Labels (6)
1 Reply
Anil_Babu_Samineni

@Pooja_QlikSense28 Hope your variable returns correct? For me this sounds you are comparing data with Date vs Number format.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful