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.
Solved! Go to Solution.
@semidevil- Try something like this:
PriorDate = var PriorMonthDate = DATE(YEAR(TODAY()),MONTH(TODAY())-1,DAY(TODAY())) return CALCULATE(SUM(Table[data]),filter(Table,Table[Date]<PriorMonthDate))
or something along those lines.
@Greg_Deckler - Ive tried this in my measure but the values are not being restricted to the previous month but YTD. Can you help please? Thanks!
Hi @Ana2022 -
That's really complicated DAX...
Three questions:
Hi! I came across this looking for a solution for a similar problem. I wanted to share what I came up with for anyone who might be looking in the future...
CALCULATE(
TOTALYTD (
[Forecasted Contract Count],
'Calendar'[Date]
),
INTERSECT(
DATESYTD('Calendar'[Date]),
PREVIOUSMONTH('Calendar'[Date])
)
)
Thank you so much, this works perfectly.
Incredibly difficult to say since there is no data given or desired outcome given. But, you could create a date and use it in a FILTER like this:
Measure = VAR MyDate = DATE(YEAR(TODAY()),MONTH(TODAY())-1,DAY(TODAY())) RETURN <do something here where you filter using MyDate>
thanks. Here's a sample code. when I run this, I seem to get the sum of the entire data, not just from January.
PriorDate = var PriorMonthDate = DATE(YEAR(TODAY()),MONTH(TODAY())-1,DAY(TODAY())) return CALCULATE(SUM(Table[data]),filter(Table,PriorMonthDate))
@semidevil- Try something like this:
PriorDate = var PriorMonthDate = DATE(YEAR(TODAY()),MONTH(TODAY())-1,DAY(TODAY())) return CALCULATE(SUM(Table[data]),filter(Table,Table[Date]<PriorMonthDate))
or something along those lines.
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 |
---|---|
115 | |
99 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |