Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
joshrussin
Creator III
Creator III

Extracting data from individual months

I need to figure out a way to pull the total processed for each month.

LOAD

    Date_Dash,

    Month(Date_Dash) as vLM,

    Year(Date_Dash) as vLY,

    MakeDate(year(Date_Dash)) as vCY,

    MakeDate(month(Date_Dash)) as vCM,

    Program_Dash,

    UOM_Dash,

    Status_Dash,

    Ave_Cost_Dash,

    Processed_Dash

Currently have this in my script to attempt the MakeDate for the month and year.

Attempting this equation to retrieve the data for a specific month in the current year.

=Sum({$<Status_Dash={'Completed'}, vCM = {"$(=Month('7'))"}, vCY = {"$(=Year(Today()))"}>} Processed_Dash)

I passed the 7 to try and retrieve July's data. Just returns a 0.

Any suggestions?

1 Solution

Accepted Solutions
sunny_talwar

Try like this

LOAD

    Date_Dash,

    Month(Date_Dash) as Month,

    Num(Month(Date_Dash)) as MonthNum,

    Year(Date_Dash) as Year,

    MakeDate(year(Date_Dash)) as vCY,

    MakeDate(month(Date_Dash)) as vCM,

    Program_Dash,

    UOM_Dash,

    Status_Dash,

    Ave_Cost_Dash,

    Processed_Dash

and then this

=Sum({$<Status_Dash={'Completed'}, MontNum = {7}, Year = {"$(=Year(Today()))"}>} Processed_Dash)

Note: I have changed your field names from vblahblah to Month and Year because v is usually used for variables. By using v as a field name, you are probably going to confuse other developers and/or people on the community making them think that vblahblah is a variable.

View solution in original post

1 Reply
sunny_talwar

Try like this

LOAD

    Date_Dash,

    Month(Date_Dash) as Month,

    Num(Month(Date_Dash)) as MonthNum,

    Year(Date_Dash) as Year,

    MakeDate(year(Date_Dash)) as vCY,

    MakeDate(month(Date_Dash)) as vCM,

    Program_Dash,

    UOM_Dash,

    Status_Dash,

    Ave_Cost_Dash,

    Processed_Dash

and then this

=Sum({$<Status_Dash={'Completed'}, MontNum = {7}, Year = {"$(=Year(Today()))"}>} Processed_Dash)

Note: I have changed your field names from vblahblah to Month and Year because v is usually used for variables. By using v as a field name, you are probably going to confuse other developers and/or people on the community making them think that vblahblah is a variable.