Forum Discussion
dkushner
8 years agoFrequent Visitor
select value from the table based on current month
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 ...
- 8 years ago
Create new measure:
BudgetThisMonth = calculate(sum(BudgetMonthlyRubles),year(table[budgetPeriod])=year(now()),month(table[budgetPeriod])=month(now()))
gooranga1
8 years agoPower Participant
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)
- dkushner8 years agoFrequent Visitor
Sorry, but I don't understand how it is helping me )
I need to get 1 number to use it later in further calculations