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,
I'm trying to generate a report in Power BI, showing in a chart the total expenditures per month against the average per month per year of the same measure. I have done this report before in Microstrategy, now I want to have the same in Power BI.
This should be the final chart. To have in mind, there is a slicer in the report, selecting certain years.
Solved! Go to Solution.
Sorry, @brumero - my mistake, I meant:
Average Measure =
VAR __Year = MAX('Table'[Year])
VAR __Table =
SUMMARIZE(
FILTER(ALL('Table'),[Year] = __Year),
[Month],
"__Value",SUM('Table'[Value])
)
RETURN
AVERAGEX(__Table,[__Value])
It's the littlest things...
@brumero ,
try like
Averagex(Summarize(Filter(Table,Table[Year]=max(Table[year])),Table[Month],table[Year],"_sum",sum(Table[Value])),[_sum])
Sorry, @brumero - my mistake, I meant:
Average Measure =
VAR __Year = MAX('Table'[Year])
VAR __Table =
SUMMARIZE(
FILTER(ALL('Table'),[Year] = __Year),
[Month],
"__Value",SUM('Table'[Value])
)
RETURN
AVERAGEX(__Table,[__Value])
It's the littlest things...
So the average would be something like:
Average Measure =
VAR __Year = MAX('Table'[Year])
VAR __Table =
SUMMARIZE(
FILTER('Table',[Year] = __Year),
[Month],
"__Value",SUM('Table'[Value])
)
RETURN
AVERAGEX(__Table,[__Value])
Use a column/line chart. Your final chart will look a little different than that in Power BI.
Thanks @Greg_Deckler ,
I'd tried but I get the same result as other methods. Let me show you.
$ Prom Año =
VAR __Year = MAX('01 Fecha'[Fecha].[Year])
VAR __Table =
SUMMARIZE(
FILTER('01 Fecha',[Year] = __Year),
[Month],
"__Value",SUM('05 Mayor PA'[Gasto U$D])
)
RETURN
AVERAGEX(__Table,[__Value])
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 |
---|---|
98 | |
97 | |
81 | |
77 | |
66 |
User | Count |
---|---|
126 | |
105 | |
103 | |
81 | |
72 |