Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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. Required a calculated column, which will give me 2019 volume number to respective month errecpective of any year in the row.
Below is a sample table.
| Volume | 2019 Volume | |
| 5/1/2021 | 61.95 | |
| 4/1/2021 | 79.90 | |
| 3/1/2021 | 77.82 | |
| 2/1/2021 | 31.26 | |
| 1/1/2021 | 73.70 | |
| 12/1/2020 | 23.29 | |
| 11/1/2020 | 31.01 | |
| 10/1/2020 | 32.62 | |
| 9/1/2020 | 96.02 | |
| 8/1/2020 | 57.03 | |
| 7/1/2020 | 92.29 | |
| 6/1/2020 | 44.06 | |
| 5/1/2020 | 69.18 | |
| 4/1/2020 | 36.51 | |
| 3/1/2020 | 40.27 | |
| 2/1/2020 | 48.76 | |
| 1/1/2020 | 20.02 | |
| 12/1/2019 | 57.93 | |
| 11/1/2019 | 79.38 | |
| 10/1/2019 | 19.48 | |
| 9/1/2019 | 19.13 | |
| 8/1/2019 | 20.03 | |
| 7/1/2019 | 35.74 | |
| 6/1/2019 | 55.23 | |
| 5/1/2019 | 97.64 | |
| 4/1/2019 | 35.52 | |
| 3/1/2019 | 68.00 | |
| 2/1/2019 | 37.86 | |
| 1/1/2019 | 58.07 | |
| 12/1/2018 | 95.56 | |
| 11/1/2018 | 64.16 | |
| 10/1/2018 | 4.02 | |
| 9/1/2018 | 76.18 | |
| 8/1/2018 | 51.35 | |
| 7/1/2018 | 34.06 | |
| 6/1/2018 | 94.95 | |
| 5/1/2018 | 69.14 | |
| 4/1/2018 | 45.19 | |
| 3/1/2018 | 80.90 | |
| 2/1/2018 | 17.84 | |
| 1/1/2018 | 47.14 |
Solved! Go to Solution.
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
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
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.
=sumx(filter(table,format(table[date],"yyyymm")=format(earlier(table[date]),"2019mm")),table[volumne])
Hi Daniel,
Thanks for quick revert.
After using the dax I'm getting blank cell.
i think because I have two more column before date column.
1. Market
2. Category
Could you help in modifying the current dax please?
Thanks
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 6 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 7 | |
| 7 |