Forum Discussion
Anonymous
6 years agoNot applicable
Average by Multiple Categories
Hello Power BI Community! I would like some help calculating the average RTD using only the first two months of Poll data for each combination of Source Site and Destination. Example ...
- 6 years ago
Hi,
These calculated column formulas work
First poll data for source site and destination combination = CALCULATE(MIN(Data[Poll Date]),FILTER(Data,Data[Source Site]=EARLIER(Data[Source Site])&&Data[Destination]=EARLIER(Data[Destination])))2 month average RTD = CALCULATE(AVERAGE(Data[RTD]),FILTER(Data,Data[Source Site]=EARLIER(Data[Source Site])&&Data[Destination]=EARLIER(Data[Destination])&&EDATE(Data[First poll date for Source site and destination combination],1)>=Data[Poll Date]))Hope this helps.
Greg_Deckler
Community Champion
6 years agoAnonymous - You should be able to get there using Lookup Min/Max https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/m-p/985814#M434
If that doesn't get you there, please post your data as text in a table. Thanks.