Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello, I am new to Power BI, and I am trying to solve one (probably easy) task, but not sure how.
Let me simplify it:
I have data in such format:
YEAR Company Result
2023 A 100
2022 B 150
2022 C 120
2021 D 250
2022 B 50
...
Then I already have a visual - table created:
2021 - Result 2022 - Result 2023 - Result
A 0 0 100
B 0 200 0
C 0 120 0
D 250 0 0
Total 250 320 100
And I need to add one more column to this existing visual to calculate "Difference" 2023-2022. How can I do it, please?
Thanks.
Katarína
Solved! Go to Solution.
Give you made a matrix table
Please try
Difference =
VAR _y = [result]
VAR _ly = CALCULATE([result],calendar[year] = MAX(Calendar[year]) -1)
RETURN
_y - _yl
many thanks for your help!
Give you made a matrix table
Please try
Difference =
VAR _y = [result]
VAR _ly = CALCULATE([result],calendar[year] = MAX(Calendar[year]) -1)
RETURN
_y - _yl
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
11 | |
10 | |
10 | |
9 |
User | Count |
---|---|
18 | |
13 | |
12 | |
11 | |
8 |