Forum Discussion
How to write my excel formula in DAX
- Anonymous4 years ago
Hi Masoud_ ,
You can create a calculated column as below to get it, please find the details in the attachment.
Column = VAR _cur = 'Table'[Celsius] VAR _cur1 = CALCULATE ( MAX ( 'Table'[Celsius] ), FILTER ( 'Table', 'Table'[Temp#55] = EARLIER ( 'Table'[Temp#55] ) + 1 ) ) VAR _cur2 = CALCULATE ( MAX ( 'Table'[Celsius] ), FILTER ( 'Table', 'Table'[Temp#55] = EARLIER ( 'Table'[Temp#55] ) + 2 ) ) VAR _cur3 = CALCULATE ( MAX ( 'Table'[Celsius] ), FILTER ( 'Table', 'Table'[Temp#55] = EARLIER ( 'Table'[Temp#55] ) + 3 ) ) VAR _cur4 = CALCULATE ( MAX ( 'Table'[Celsius] ), FILTER ( 'Table', 'Table'[Temp#55] = EARLIER ( 'Table'[Temp#55] ) + 4 ) ) RETURN IF ( _cur4 - _cur3 > 0 || _cur3 - _cur2 > 0, 1, IF ( _cur2 - _cur1 > 0 && _cur3 - _cur4 > -0.05, 1, 0 ) )If the above one can't help you get the desired result, please provide some sample data in the table (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
How to upload PBI in Community
Best Regards
Hi Masoud_ ,
You can create a calculated column as below to get it, please find the details in the attachment.
Column =
VAR _cur = 'Table'[Celsius]
VAR _cur1 =
CALCULATE (
MAX ( 'Table'[Celsius] ),
FILTER ( 'Table', 'Table'[Temp#55] = EARLIER ( 'Table'[Temp#55] ) + 1 )
)
VAR _cur2 =
CALCULATE (
MAX ( 'Table'[Celsius] ),
FILTER ( 'Table', 'Table'[Temp#55] = EARLIER ( 'Table'[Temp#55] ) + 2 )
)
VAR _cur3 =
CALCULATE (
MAX ( 'Table'[Celsius] ),
FILTER ( 'Table', 'Table'[Temp#55] = EARLIER ( 'Table'[Temp#55] ) + 3 )
)
VAR _cur4 =
CALCULATE (
MAX ( 'Table'[Celsius] ),
FILTER ( 'Table', 'Table'[Temp#55] = EARLIER ( 'Table'[Temp#55] ) + 4 )
)
RETURN
IF (
_cur4 - _cur3 > 0
|| _cur3 - _cur2 > 0,
1,
IF ( _cur2 - _cur1 > 0 && _cur3 - _cur4 > -0.05, 1, 0 )
)
If the above one can't help you get the desired result, please provide some sample data in the table (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
How to upload PBI in Community
Best Regards
Anonymous
Thank you for your answer. It worked perfectly.
I appreciate your time and effort.
Kind Regards,
Masoud