Forum Discussion
Optimize DAX memory
Unfortunately, I cant post the actually data due to privacy issues nor can i give you the actual file that im working with. I undertand how that would make it eaiser to answer my question. Apologize for the little information to go off of.
Also, please go to www.daxformatter.com and format the measure properly so that people can read it.
Thanks.
Best
D
- Anonymous6 years agoNot applicable
Moving Range =
IF (
ISBLANK ( 'eOVL Data - MySQL'[Earlier Time1] ),
BLANK (),
(
VAR EarlierTime =
CALCULATE (
MAX ( 'eOVL Data - MySQL'[TimeStamp] ),
FILTER (
ALLSELECTED ( 'eOVL Data - MySQL'[TimeStamp] ),
'eOVL Data - MySQL'[TimeStamp]
< SELECTEDVALUE ( 'eOVL Data - MySQL'[TimeStamp] )
)
)
VAR EarlierMeasureValue =
CALCULATE (
SUM ( 'eOVL Data - MySQL'[Measured Value] ),
'eOVL Data - MySQL'[TimeStamp] = EarlierTime
)
RETURN
ABS ( EarlierMeasureValue - SUM ( 'eOVL Data - MySQL'[Measured Value] ) )
)
)This should now be a proper dax equation. All selected is becasue i have slicers that need to be used. I know this will slow down Power bi also but i need the. Basically there is thousands of part numbers that this is looking through and the time in which they were measured. Its let putting them in order from oldest to newest. Its then getting the diffrence between measurments. If your familiar with stats, its a moving range chart. The equations that i use work when the data that is pulled isnt huge but when I pull from our SQL database instead of an excel workbook it takes 20 min.
- Anonymous6 years agoNot applicable
Oh, and there is a date table you just couldnt see it in the Snip-it that was sent.