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.
Hello,
I'm trying to have 2 columns. One for the budget for current year, and one for the budget of next year. So if I set Year = 2021, I want a column with 2021 numbers and 2022 numbers. Eventually, I want to have a 3rd column that's the total for current year + next year, but I'm having difficulties getting the correct DAX formula for the next year's budget to apply.
There are 2 tables involved, a Year table, and a Budgets table. I decided to create a new column [Year # Future = Year + 1] in the Year table to simplify things.
I so far have:
Hi @shinney ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create calculated columns.
Year # Future = 'BudgetAmount'[Year]+1
Next Year Budget = CALCULATE(max('BudgetAmount'[Budget]),FILTER('BudgetAmount','BudgetAmount'[Year]=EARLIER(BudgetAmount[Year # Future])))
current year and next year budget = 'BudgetAmount'[Budget]+'BudgetAmount'[Next Year Budget]
(3) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@shinney , Have a separate year or date table joined with your table
example
//Only year vs Year, not a level below
This Year = CALCULATE(sum('Table'[Qty]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])))
Last Year = CALCULATE(sum('Table'[Qty]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])-1))
diff = [This Year]-[Last Year ]
diff % = divide([This Year]-[Last Year ],[Last Year ])
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s
Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA
I have also tried the following DAX, but this did not work either:
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |