Forum Discussion
Anonymous
4 years agoNot applicable
Measure: return the max average(by months)
Hi, I've started with Power BI a week ago. I found that was the perfect tool for what i was asked for. I've been chosen to get the time measures of the processes of my company. The metric chosen ha...
- 4 years ago
Anonymous can you try the above?
avgByProdMaxYear = CALCULATE ( AVERAGE ( 'Sample'[LT] ), VAR _base = GROUPBY ( 'Sample', 'Sample'[Product], 'Sample'[Year], "avg", AVERAGEX ( CURRENTGROUP (), 'Sample'[LT] ) ) VAR _rank = SUMMARIZE ( FILTER ( ADDCOLUMNS ( _base, "rank", RANKX ( FILTER ( _base, [Product] = EARLIER ( [Product] ) ), [avg],, DESC ) ), [rank] = 1 ), 'Sample'[Product], 'Sample'[Year] ) RETURN _rank ) - 4 years ago
Anonymous please refer to the attached pbix
PaulOlding
Solution Sage
4 years agoHi Anonymous
Something like
LT_Average_max =
MAXX(
VALUES(Table[month]),
AVERAGE(Table[Lead Time])
)
Anonymous
4 years agoNot applicable
Hi PaulOlding.
This solution gives me the same solution as the annual average. The measure that I am looking for should calculate the LT for each month and provide the maximum value. In the table attached, LT_Average_min = 18,92 (I need the lowest btw, but it does not affect).
Thank you in any case.
- PaulOlding4 years ago
Solution Sage
I think to help any further I would need some example data and the result you're expecting from that.
- Anonymous4 years agoNot applicable
I've made a sample in which three tables are shown.
- Sample data
- Summary
- Summary_by_Year_Product (Pivot table)
You can access the table through this link: data example.xlsx
The pasword is:
Power_BI