# New to QlikView

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

Announcements
cancel
Showing results for
Did you mean:
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
MVP

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

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
4 Replies
MVP

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

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
Champion III

Can you try this?

or

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

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

Partner

Try this expression.

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

See attached qvw

Plees ekskuse my Swenglish and or Norweglish spelling misstakes
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.