Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Ambrasegato
Contributor II
Contributor II

Sum value on Max Date

Hi all,

I have a data set containing Market Share information for some drugs by month and I am trying to calculate the Market Share on the latest month available in the data set.

I have created one variable: Last_Update =max(End_Date) which I use for different purposes but I am not able to get the formula for the sum right. Based on other threads, I have tried the following:

Sum({<End_Date = {"=$(=Date(Last_Update, 'DD/MM/YYYY'))"}>} value) -> the result gives me the value without the time filter applied

Sum({<End_Date = {'$(Last_Update)'}>} value) ->results in undefined result, nothing shows in the chart.

Can you help?

Labels (1)
1 Solution

Accepted Solutions
Ambrasegato
Contributor II
Contributor II
Author

This formula worked 

Sum({<End_Date={"$(=Date(Last_Update,'DD/MM/YYYY'))"}>} value)

View solution in original post

3 Replies
GaryGiles
Specialist
Specialist

Try this:

=sum({<Date={'$(=$(Last_Update))'}>} Value)

Ambrasegato
Contributor II
Contributor II
Author

Unfortunately it does not seem to work.

For some context, I am creating a new measure which value is defined by the above calculation, not sure if it is a useful information.

 

Ambrasegato
Contributor II
Contributor II
Author

This formula worked 

Sum({<End_Date={"$(=Date(Last_Update,'DD/MM/YYYY'))"}>} value)