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

Announcements
FLASH SALE: Save $500! Use code FLASH2026 at checkout until Feb 14th at 11:59PM ET. Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
denis115
Creator
Creator

straight table

Hello!

I need help!

I have a table where I have :

prodname

sales_sum

start sales

last sales

and when I select big period of time I need to see in : sales sum (sum of sales in this period)  ,  start sales (sales of first month selected)

and last sales (sales of last month selected)

how can I do this?

Thank you!

1 Solution

Accepted Solutions
tresB
Champion III
Champion III

Try:

Sum ( {<[Начало Месяца]={"$(=Min([Начало Месяца]))"}>}[Ост.Начало Стоим.])

Sum ( {<[Начало Месяца]={"$(=Max([Начало Месяца]))"}>}[Ост.Начало Стоим.])

Note: If you wish to select from another date field, you might have to include those date fields as well in the expression to nullify it's effect. like:

Sum ( {<[Конец Месяца], [Начало Месяца]={"$(=Min([Начало Месяца]))"}>}[Ост.Начало Стоим.])

Sum ( {<[Конец Месяца], [Начало Месяца]={"$(=Max([Начало Месяца]))"}>}[Ост.Начало Стоим.])

View solution in original post

16 Replies
mdmukramali
Specialist III
Specialist III

Hi,

You can Use Calendar Object.

See here for a video tutorial on just that subject.

Thanks,

Mukram.

kenphamvn
Creator III
Creator III

Hi

try expression like this

sales_sum: sum(Sales)

start sales: sum({<Month={"=$(=Min(Month))"}>} Sales)

last sales: sum({<Month={"=$(=Max(Month))"}>} Sales)


regards,


denis115
Creator
Creator
Author

there is an error in expression

tresB
Champion III
Champion III

Could you share your sample qvw?

HirisH_V7
Master
Master

Hi,

i hope this three kind of expressions will give you a desired result,

  1. Sum({<MonthNum={'$(=Min({<Year={"$(=Min(Year))"}>}MonthNum))'}>}Sales)
  2. Sum(Sales)
  3. Sum({<MonthNum={'$(=Max({<Year={"$(=Max(Year))"}>}MonthNum))'}>}Sales)

you need to have your date calendar having monthnum column and year as above.

HTH,

PFA,

Hirish

HirisH
denis115
Creator
Creator
Author

Can I do it with my variabiles?

HirisH_V7
Master
Master

Yes! you can ,

But you need to check there are working as expected, By checking them in text box or in straight table itself by hovering on expression(Expression should not be labeled).

HirisH
denis115
Creator
Creator
Author

test

HirisH_V7
Master
Master

* I have made changes in my above post . Please check.

HirisH