Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Our May 2021 end-to-end product release from Data Integration to Data Analytics is out! READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
eddysunn
Contributor III
Contributor III

Monthly Bar Chart for weekly updated incremental table

Hi Everyone,

I have a problem with building a bar chart.

In my system the table is updated weekly on the status of every row in the table - I am kind of creating a screen shot of a table for that particular week. I need to create a bar chart that shows monthly values of Sales. the date of the data load is stored in a field called _loadedOn.

My current approach:

Dimension: MonthName(_loadedOn)

Measure: Sum(Sales)

     The problem with this approach is that it sums up all the weeks within a month and gives a huge value. What is preferable instead is summing only the latest week in a month.

Any ideas on how to tackle this?

Thanks.

Edil

9 Replies
ahaahaaha
Master
Master

Hi Edil,

I think you should use the Master calendar.

Regards,

Andrey

vinieme12
Champion II
Champion II

You should be referring to the max(Loadedon) date in Set analysis

sum({<LoadedOn = {"=Date(Max(LoadedOn))"}>}Sales)

Dates in Set Analysis

eddysunn
Contributor III
Contributor III
Author

I started with $<_loadedOn={"$(=Date(Max(loadedOn)))"}> inside the set expression, however the problem there is that it disregards the dimensions of months. Meaning that it only shows me the last month and all the previous months are disregarded. In the case I need, we need to choose a max date in every month.

and yeah, thanks for your time!

eddysunn
Contributor III
Contributor III
Author

Thanks Andrey,

Want to stick to my current fields available before jumping to creating extra ones.

vinieme12
Champion II
Champion II

please post a sample app

Preparing examples for Upload - Reduction and Data Scrambling

or try

sum(AGGR( sum({<LoadedOn = {"=Date(Max(LoadedOn))"}>}Sales) , Month))

beck_bakytbek
Master
Master

beck_bakytbek
Master
Master

eddysunn
Contributor III
Contributor III
Author

Rahmat, Bek

May be I will have to look at something like this:

https://community.qlik.com/thread/74202

beck_bakytbek
Master
Master

HI Edil,

look at this: https://www.youtube.com/watch?v=ckb57Mjrheg

it is about : creating of flags

i hope that helps

Beck