Forum Discussion
twister8889
Helper V
6 years agoN values MIN/MAX EDITOR QUERY
Hi guys, I have some data like the table below, I need to find the N min/max values per period to calculate the average, for example, in the first row: Average Min: I find the Values from mo...
- 6 years ago
Hi twister8889
here is my solution. Use the following measures:
Sum of Value = SUM('Table'[Value]) Highest = CALCULATE ( AVERAGEX ( TOPN ( 'TopN'[TopN Value], 'Table', [Sum of Value], DESC ), 'Table'[Value] ), ALL ( 'Table' ) ) Lowest = CALCULATE ( AVERAGEX ( TOPN ( 'TopN'[TopN Value], 'Table', [Sum of Value], ASC ), 'Table'[Value] ), ALL ( 'Table' ) )You can dowmload the pbix file here.
Regards FrankAT
twister8889
Helper V
6 years agoFirst of all, thank you for your answer...
I opened the thread in the power query. So I will analyze your suggestion, but I will keep just the question in power query thread. I'm sorry for the inconvenient.
Thank you Miguel
MFelix
Super User
6 years agoHi @twister8889,
You need this in Power Query?
Be aware that in Power Query the dinamic part is not as linear as in DAX, because when you select the parameters for your query to calculate after the upload they stay as you defined them then you need to reselect and refresh the query.