Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
LINKEDIN LIVE: Democratizing data to enhance customer-centricity. JULY 29TH REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

sum (or show field value) from the first day of the current month

Hi all,

I have data that is loaded in on the first of every month and I want to show that value or the sum of that day with set analysis. I've had some trouble with this heres what I've tried

let vDateofData = Month(Today) & '/01/' Year(Today)  - Not sure if this is right I want it to show current month - then the first - then the current year so basically if it was june 5th 2015 I want it to show 06/01/2015.

Then I want to sum that value (I Was having problems with get field value).

I tried

sum({<Date = {"=$(vDateofData)"} >} [Value]

Not sure what the problem is. If anyone has suggestions or critiques they are welcomed.

4 Replies
krishnacbe
Partner
Partner

You can try below expression for the variable

LET vDateofData = MonthStart(today())

Check the formatting of Date field. you need to format the variable in same format.

sunny_talwar

What is your date field format here? Is it read as date by QlikView or not? Check these links:

QlikView Date fields

Get the Dates Right

Why don’t my dates work?

Dates in Set Analysis

Not applicable
Author

The model has a calendar so I have a date key for say July, 4th 2010 would be: 20100704 but it also has a corresponding date of 7/4/2010

sunny_talwar

May be like this:

Sum({<Date = {"$(=Date(MonthStart(Today()), 'M/D/YYYY'))"}>} [Value])