Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Hi,
I've been struggling with writing a DAX statement that will solve this, and would greatly appreciate any help!
I have a table
| BudgetPeriod | BudgetMonthlyRubles | DaysInMonth |
| 01.01.2018 | 3978728 | 31 |
| 01.02.2018 | 4012188 | 28 |
| 01.03.2018 | 4319828 | 31 |
| 01.04.2018 | 4518324 | 30 |
| 01.05.2018 | 4592812 | 31 |
| 01.06.2018 | 4752517 | 30 |
| 01.07.2018 | 5615683 | 31 |
| 01.08.2018 | 4110937 | 31 |
| 01.09.2018 | 5326105 | 30 |
| 01.10.2018 | 5451250 | 31 |
| 01.11.2018 | 5054974 | 30 |
| 01.12.2018 | 5151887 | 31 |
I need to create a measure that will return the value from the column "BudgetMonthlyRubles" based on the current month and year, so for the january 2018 I should get as a result 3978728
Solved! Go to Solution.
Create new measure:
BudgetThisMonth = calculate(sum(BudgetMonthlyRubles),year(table[budgetPeriod])=year(now()),month(table[budgetPeriod])=month(now()))
Create new measure:
BudgetThisMonth = calculate(sum(BudgetMonthlyRubles),year(table[budgetPeriod])=year(now()),month(table[budgetPeriod])=month(now()))
Hi @dkushner
You can create a column in your table that extracts the month and year from current date using now() and set the day to 1 then compare that with BudgetPeriod. You will have to format your BudgetPeriod as a type date otherwise you will have to create a string of the date which is possible.
Replace "column1" with BudgetPeriod in your case. You can then filter on the table where [Current Date]=1.
Current Date = if(DATE(year(now()),month(now()),01)=Table3[Column1],1,0)
Sorry, but I don't understand how it is helping me )
I need to get 1 number to use it later in further calculations
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 21 | |
| 20 | |
| 18 | |
| 13 |
| User | Count |
|---|---|
| 58 | |
| 51 | |
| 38 | |
| 31 | |
| 26 |