Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi,
I currently have the following measure to calculate 2 moving averages:
- one on all gains
- another on all losses.
The averages are moving over the last 14 periodes within a timeframe (timestamps are ranked per timeframe), and timeframes can be hours, days, ... yet always having a respective timeframe. The following measure works, but I believe given it's pretty static, it should be calculated in a column instead of measure. Is this possible?
RSI = 
VAR 
	GainCalc = abs(CALCULATE (
    AVERAGEx(AllCandleData, [Gain]),
    filter(ALLEXCEPT ( AllCandleData,AllCandleData[Symbol],AllCandleData[Exchange],AllCandleData[Interval] ),
    AllCandleData[Rank] > (MAX(AllCandleData[Rank]) - 14 )
        && AllCandleData[Rank] <= MAX(AllCandleData[Rank])
)
    )
)
VAR 
	LossCalc = abs(CALCULATE (
    AVERAGEx(AllCandleData,[Loss]),
    filter(ALLEXCEPT ( AllCandleData,AllCandleData[Symbol],AllCandleData[Exchange],AllCandleData[Interval] ),
    AllCandleData[Rank] > (MAX(AllCandleData[Rank]) - 14 )
        && AllCandleData[Rank] <= MAX(AllCandleData[Rank])
)
    )
)
RETURN
if(LossCalc=0 , 100 , 100-(100/(1+DIVIDE(
	GainCalc,LossCalc,BLANK()))))Unfortunately, the result should be repeated on all timeframes. Similar to last non blank. Check below for screenshot. Can anyone help me out making this work on a measure, or convert this into a calculated column?
I don't mind making a measure or calculated column by timeframe ...
Of course, link to some sample data where the RSI is calculated using the measure mentionned above. Again, if we can have this is a calculated column, performance would probably seriously enhanced, but not a must.
Detail
Summary
Hi @wlknsn,
Due to policy I can't download sample file from shared link , can you please upload it to onedrive or google drive?
Regards,
Xiaoxin Sheng
 
					
				
				
			
		
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
 
            | User | Count | 
|---|---|
| 87 | |
| 49 | |
| 36 | |
| 31 | |
| 30 |