Forum Discussion
Dev_Pat
5 years agoFrequent Visitor
DAX for Year in Calculated Column
Hi Team, I need a help to develop a DAX as calculated column . Below is the detail requirement. Any help much appriciated. I have data of last 4 year (2018-Jan to 2021-May) in rows shown below....
- 5 years ago
2019 Volume CC =
VAR _currentrowmonth =
MONTH ( Data[Date] )
VAR _resulttable =
SELECTCOLUMNS (
FILTER (
Data,
YEAR ( Data[Date] ) = 2019
&& MONTH ( Data[Date] ) = _currentrowmonth
),
"@result", Data[Volume]
)
RETURN
_resulttable
Jihwan_Kim
Super User
5 years ago
2019 Volume CC =
VAR _currentrowmonth =
MONTH ( Data[Date] )
VAR _resulttable =
SELECTCOLUMNS (
FILTER (
Data,
YEAR ( Data[Date] ) = 2019
&& MONTH ( Data[Date] ) = _currentrowmonth
),
"@result", Data[Volume]
)
RETURN
_resulttable
Dev_Pat
5 years agoFrequent Visitor
Hi Kim,
Thanks for quick revert.
I'm getting an issue saying "A table of multiple values was supplied where a single value was expected".
i think because I have two more column before date column.
1. Market
2. Category
Could you help in modifying the current dax please?
A great thanks for your help.