Qlik Community

Ask a Question

New to QlikView

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

Announcements
Welcome to our newly redesigned Qlik Community! Read our blog to learn about all the new updates: READ BLOG and REPORTED ISSUES
cancel
Showing results for 
Search instead for 
Did you mean: 
Creator III
Creator III

Only show monthends in a graph

Hi, 

I have a table with balances for every day of the month for 2 years (2018 to 2020)

two fields: Balance_date, Balance_amount

 

I want a chart that will only show me the monthends for these values.

Dimension would be:  Year(Balance_date)&'-'&Month(Balance_date)

Expression: sum(Balance_amount)

I tried sum({< Balance_date = {'$(=Date(Monthend(Balance_date )))'}>} Balance_amount)

But it obviously didn't work...

 

 

1 Solution

Accepted Solutions

Hi @sibrulotte 

You can create one flag in script and use in the set analysis which is very flexible. 

Load Balance_date, Balance_amount,

Dual(Year(Balance_date)&'-'&Month(Balance_date), MonthName(Balance_date)) as MonthYear,

If(Floor(Balance_date) = Floor(MonthEnd(Balance_date)), 1, 0) as Flag

from yoursourcetable;

In front end,

MonthYear as Dimension

and sum({<Flag={1}>}Balance_amount)

Thanks & Regards,
Mayil Vahanan R

View solution in original post

4 Replies

Hi @sibrulotte 

You can create one flag in script and use in the set analysis which is very flexible. 

Load Balance_date, Balance_amount,

Dual(Year(Balance_date)&'-'&Month(Balance_date), MonthName(Balance_date)) as MonthYear,

If(Floor(Balance_date) = Floor(MonthEnd(Balance_date)), 1, 0) as Flag

from yoursourcetable;

In front end,

MonthYear as Dimension

and sum({<Flag={1}>}Balance_amount)

Thanks & Regards,
Mayil Vahanan R

View solution in original post

Champion III
Champion III

Can you try this?

Sum({$<Balance_date ={'$(=MonthEnd(AddMonths(Balance_date), -1))'}>} Balance_amount)

 

or

     if(monthend(Balance_date) = Balance_date, 1,0) as MonthEnd_Flag.     -- script 

 Sum({$<MonthEnd_Flag = {"1"}>} Balance_amount)

Partner
Partner

Try this expression.

=sum({<Date = {"=Date=Dayname(Monthend(Date))"}>}Balance_amount)

image.png

See attached qvw

Plees ekskuse my Swenglish and or Norweglish spelling misstakes
Digital Support
Digital Support

@sibrulotte You have received three good responses on this one, we would appreciate it if you would return to the thread and use the Accept as Solution on the post(s) that helped, or if you have further questions, please leave an update.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.