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

How to get the YTD Chart correct and the "PY Actual" calculation correct?

Hi All ,

My Requirement is , I have to build report depending on the snapshot. Please verify if , my YTD chart is correct ?

My PY Actual expression is not working correctly .

Capture.PNG

Please find the sample model attached.

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

The Max works with selection, so when you select 2015, the Max function will give 2015 as result and then the variable will give  2014 as result.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

7 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Change your vPrevFiscalYear variable to

=Max([Fiscal Year])-1

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Anil_Babu_Samineni

What you are trying for Current Year, As you said it's working good

Can you share the expression? And then, we might offer you to get PY

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
suvechha_b
Creator III
Creator III
Author

But , there is a possibility that I have to load for [Fiscal Year] 2014 until 2017 .

Thus , when I select 2015 , the report should work.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

The Max works with selection, so when you select 2015, the Max function will give 2015 as result and then the variable will give  2014 as result.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
suvechha_b
Creator III
Creator III
Author

Sum(Aggr(if(Measure='Quantity',SUM({<[Fiscal Year]={$(vPrevFiscalYear)},[Type Indicator] = {'A'} >} Quantity),if(Measure='Value',SUM({<[Fiscal Year]={$(vPrevFiscalYear)},[Type Indicator] = {'A'} >} [Sales Value]),if(Measure='AIMS Units',SUM({<[Fiscal Year]={$(vPrevFiscalYear)},[Type Indicator] = {'AIMS_SALES'} >} [Quantity]),SUM({<[Fiscal Year]={$(vPrevFiscalYear)},[Type Indicator] = {'AIMS_SALES'} >} [Sales Value])))),Measure))

My CurrectYear is what, I select in the filter and PY should be Select Year -1.

suvechha_b
Creator III
Creator III
Author

Please can you verify , if my YTD Report expression are correct.

Anil_Babu_Samineni

What does this vPrevFiscalYear???

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