Forum Discussion
Ale
Resolver II
4 years agoYTD value as Calculated Column (not measure) in Data View
I'm trying to create 2 columns with the Year to Date values for each record in my table, but keeping all other descriptive data (Category, Product, etc) into account. I attached a table with the ...
- 4 years ago
Hi, Ale ;
Try to create a column by dax.
YTD = CALCULATE(SUM('Table'[Value]),FILTER('Table',[Category]=EARLIER('Table'[Category])&&[Product]=EARLIER('Table'[Product])), DATESYTD('Table'[Date]))YTD-M1 = CALCULATE(MAX('Table'[YTD]),FILTER('Table',[Category]=EARLIER('Table'[Category])&&[Product]=EARLIER('Table'[Product])&&EOMONTH([Date],0)=EOMONTH(EARLIER('Table'[Date]),-1)))+0The final show;
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-yalanwu-msft
Community Support
4 years agoHi, Ale ;
Try it.
YTD-M1 =
CALCULATE (
MAX ( 'Table'[YTD] ),
FILTER (
ALLEXCEPT ( 'Table', 'Table'[Category], 'Table'[Product] ),
EOMONTH ( [Date], 0 ) = EOMONTH ( EARLIER ( 'Table'[Date] ), -1 )
)
) + 0
The 30 descriptive Data (not only Category and Product) you said need to be input one by one. The descriptive data (descriptive data) can not be supported by all the columns at once.
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.