Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi, what is a manageable way to calculate or add a certain field/column/value of each year??
The below is an example data I have. I need to add all Training Travel (Plan) values for the year 2019 (highlighted in yellow), and another calculcation will be made on 2020 (highlighted in orange).
I have created a table to showcase this, but as you can see, this is hard coded. I believe this is not manageable as time goes by and data gets massive.
This is my code for reference:
Finance = {
(2018, (SUMX(FILTER(
'MP - Engine',
'MP - Engine'[Start Date].[Year] = 2018
), 'MP - Engine'[Training Travel (Planned)]))),
(2019, (SUMX(FILTER(
'MP - Engine',
'MP - Engine'[Start Date].[Year] = 2019
), 'MP - Engine'[Training Travel (Planned)]))),
(2020, (SUMX(FILTER(
'MP - Engine',
'MP - Engine'[Start Date].[Year] = 2020
), 'MP - Engine'[Training Travel (Planned)]))),
(2021,(SUMX(FILTER(
'MP - Engine',
'MP - Engine'[Start Date].[Year] = 2021
), 'MP - Engine'[Training Travel (Planned)])))}
Solved! Go to Solution.
@GA1993 , Few ways
Create a year column in table
year = year([Start Date]) // if text then try ->// left([Start Date],4)
then create a new table
Summarize(Table, Table[Year], "Total", Sum(Table[Training Travel Plan]))
@GA1993 , Few ways
Create a year column in table
year = year([Start Date]) // if text then try ->// left([Start Date],4)
then create a new table
Summarize(Table, Table[Year], "Total", Sum(Table[Training Travel Plan]))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
46 | |
28 | |
23 | |
12 | |
8 |
User | Count |
---|---|
76 | |
51 | |
45 | |
16 | |
12 |