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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pivot table

Hello,

I am using QV 11.

I have Pivot table with 5 dimensions one of which is Month that I have pivoted.

I have written expression as

(sum({< Month = {'>=$(=(Max(Month))) <=$(=(Max(Month)+2))'} >} SalesValue)/ $(varConversionRate)

which gives me 3 months data.

I also have the curreny field with values as LCY( Local currency) and USD. and the currency Rate.

When I select LCY, it should show actual values from the DB.

When I select USD, it should apply the currency Rate and then display the values for the 3 months.

But when I select USD, the USD rate is getting applied only for current month and not for other 2 months.

Please can one help me on this.

9 Replies
vikasmahajan

Hii Apurva

Please create sample application and attach

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
Not applicable
Author

Hi ,

You please try this

=(Sum({< Month = {'>=$(=MonthStart(Max(Month))) <=$(=MonthEnd(Max(Month),2))'} >} SalesValue)/ $(varConversionRate)

I hope this is helpful to you

Not applicable
Author

Hi amuthabharathi,

I tried the above... but still it is not working.

The USD rate is getting applied only for the current selected month.

Not applicable
Author

any help please

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Please show the expression contained in varConversionRate.

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

if(Currency = 'USD', varCurrencyRate, 1)

jonathandienst
Partner - Champion III
Partner - Champion III

Is varCurrencyRate a variable with a fixed rate amount, or is it another expression?

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

it is not a fixed rate.  I am picking it from url and storing in qvd day wise and then as per year/mnth/day selections, getting the rate and applying it when USD is selected.  similarly I have done in other sales report and it is working. Only difference was that the other sales report is a monthly report and this is a report with 3 months data.

jonathandienst
Partner - Champion III
Partner - Champion III

That implies that varCurrencyRate is a field that is associated in some way with the date of the sale. It might help if you could post your model or a sample. You can scramble the data if the information is sensitive.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein