Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
vchuprina
Specialist
Specialist

Set expression select only necessary dates

Hi All,


In my application I need to have following chart


Year-MonthProduct %
4,28%
2016-040,17%
2016-054,28%
2016-064,19%
2016-070,19%
2016-084,28%
2016-094,28%
2016-104,28%
2016-114,28%
2016-124,28%
2017-014,28%
2017-024,28%
2017-034,27%
2017-044,27%


I use expression below:


=sum({$<DateType = {Product},ProductDateKey = P(DateKey),[Item Number]-={"Y*"}, [Date]={">$(=addmonths(today(),-12))"}>}[Quantity] * [Product Weigth])
/
sum({$<
DateType = {Operation}, OperationDateKey = P(DateKey),
[Date] = {">$(=addmonths(today(),-12))"} >}[Oper Quantity] * [Operation Weigth])

Chart shows correct data only when I select one year-month value:


Year-MonthProduct %
0,22%
2016-040,22%



Year-MonthProduct %
7,26%
2016-087,26%

Product and Operation tables have own date fields and they are linked by linkey table which contains - DataKey field

The reason of problem is following: my tables are linked by Item Warehouse and this key is too wide, so in chart I show Product % based on data for all period. If there a way to show correct data by set analysis? Because when I try to use Item Warehouse Date key I lost part of data from Operation table

Press LIKE if the given solution helps to solve the problem.
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").
2 Replies
prachisangewar
Creator
Creator

Hi,

Can you share a sample of your document?

vchuprina
Specialist
Specialist
Author

Unfortunately I can't show client data

Press LIKE if the given solution helps to solve the problem.
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").