Forum Discussion
seinomozh
6 years agoFrequent Visitor
Calculate first value for months
Hi guys, I would like to create a measure that calculates first value for each month based on filter. This is an example: Date System Value 09.07.2020 1st 266471,4 ...
FrankAT
6 years agoCommunity Champion
Hi seinomozh
I found the following solution:
First Value of Month =
CALCULATE(
MIN('Table'[Value]),
FILTER(
ALLEXCEPT('Table','Table'[System]),
MIN('Table'[Date])='Table'[Date]
)
)
With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)
seinomozh
6 years agoFrequent Visitor
This is great, but it is not summarize if remove month. Idea is to create a measure that can show you proper value per choosen month. So if i choose 2 month (jul+aug) it should be 350K per system.
- Anonymous6 years agoNot applicable
Hi seinomozh,
You can try to use the below formula to use system category and date filter to find out the minimum date and correspond value:
Measure = VAR minDate = CALCULATE ( MIN ( 'Table'[Date] ), ALLSELECTED ( 'Table' ), VALUES ( 'Table'[Date] ), VALUES ( 'Table'[System] ) ) RETURN CALCULATE ( MIN ( 'Table'[Value] ), FILTER ( ALLSELECTED ( 'Table' ), [Date] = minDate ), VALUES ( 'Table'[System] ) )Regards,
Xiaoxin Sheng