Forum Discussion
faiznazri
2 years agoRegular Visitor
Get all previous year data (December) and current data based on slicer Year-Month selection
Hi everyone, appreciate if you can help me to create a bar chart that can show all December previous year sales and current date sales (based on Slicer Year-Month selection). Thanks!
- Anonymous2 years ago
Hi faiznazri ,
I don't have access to the data source you provided, but I did a simple test with reference to the following formula:
M_ = VAR table_ = FILTER ( 'Date', 'Date'[Slicer] = SELECTEDVALUE ( 'Date'[Slicer] ) ) VAR col_ = SELECTCOLUMNS ( table_, "col", [Date] ) VAR sel_ = CALCULATE ( MAX ( 'Table'[Value] ), FILTER ( 'Table', 'Table'[Date] IN col_ || TODAY () = 'Table'[Date] ) ) RETURN sel_Best Regards,
Adamk KongIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- AnonymousNot applicable
Hi faiznazri ,
I don't have access to the data source you provided, but I did a simple test with reference to the following formula:
M_ = VAR table_ = FILTER ( 'Date', 'Date'[Slicer] = SELECTEDVALUE ( 'Date'[Slicer] ) ) VAR col_ = SELECTCOLUMNS ( table_, "col", [Date] ) VAR sel_ = CALCULATE ( MAX ( 'Table'[Value] ), FILTER ( 'Table', 'Table'[Date] IN col_ || TODAY () = 'Table'[Date] ) ) RETURN sel_Best Regards,
Adamk KongIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.