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.
Hi,
maybe simple, but it doesn't work for me
I have a page where the reportuser can select a year and a monthname
Now i want a visual that shows all results per month that is before the selected month
For example: Select year = 2023 and month = March
The result has to be
Januari 2023 = xxx
Febrari 2023 = xxx
March 2023 = Nothing
Measure:
# Measure till month =
VAR __maxdate = MAX('Dim Calendar'[Month])
VAR __Month =
CALCULATE(
__maxdate,
REMOVEFILTERS('Dim Calendar'[MonthName])
)
VAR result =
CALCULATE(
[# Items],
KEEPFILTERS(
FILTER(
ALL('Dim Calendar'),
'Dim Calendar'[Year] = MAX('Dim Calendar'[Year]) && 'Dim Calendar'[Month] <= __Month
)
), REMOVEFILTERS('Dim Calendar'[MonthName])
)
RETURN
result
Hope someone can help me
With kind regards
@Norbertus , Try a measure like with help from date table
Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(all('Date'),'Date'[date] <=eomonth(max('Date'[date]) ,-1) ))
You can also try window function
Power BI Window function Rolling, Cumulative/Running Total, WTD, MTD, QTD, YTD, FYTD: https://youtu.be/nxc_IWl-tTc
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 |
---|---|
110 | |
97 | |
78 | |
64 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |