Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Good
I need to create a measure to calculate the "Treatment" field of each row taking into account the ticket field of the previous and subsequent rows, and that a filter is performed with the next measure, showing the results that are 1.
Best regards
Solved! Go to Solution.
Hi @Anonymous ,
Thanks for the quick response.
Hi @Syndicate_Admin ,
I have some information to add.
I have create a simple sample, please refer to my post to see if it helps you.
Measure = var _above=CALCULATE(MAX('Table'[Index]),FILTER(ALL('Table'),'Table'[Index]<SELECTEDVALUE('Table'[Index])))
var _abovere=CALCULATE(MAX('Table'[fecha]),FILTER(ALL('Table'),'Table'[Index]=_above))
var _below=CALCULATE(MIN('Table'[Index]),FILTER(ALL('Table'),'Table'[Index]>SELECTEDVALUE('Table'[Index])))
var _belowve=CALCULATE(MAX('Table'[fecha]),FILTER(ALL('Table'),'Table'[Index]=_below))
return
IF(MAX('Table'[fecha])>=_abovere&&MAX('Table'[fecha])<=_belowve,1,0)
How to Get Your Question Answered Quickly - Microsoft Fabric Community
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Thanks for the quick response.
Hi @Syndicate_Admin ,
I have some information to add.
I have create a simple sample, please refer to my post to see if it helps you.
Measure = var _above=CALCULATE(MAX('Table'[Index]),FILTER(ALL('Table'),'Table'[Index]<SELECTEDVALUE('Table'[Index])))
var _abovere=CALCULATE(MAX('Table'[fecha]),FILTER(ALL('Table'),'Table'[Index]=_above))
var _below=CALCULATE(MIN('Table'[Index]),FILTER(ALL('Table'),'Table'[Index]>SELECTEDVALUE('Table'[Index])))
var _belowve=CALCULATE(MAX('Table'[fecha]),FILTER(ALL('Table'),'Table'[Index]=_below))
return
IF(MAX('Table'[fecha])>=_abovere&&MAX('Table'[fecha])<=_belowve,1,0)
How to Get Your Question Answered Quickly - Microsoft Fabric Community
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
here is a similar post - Solved: Previous Row Value Dax - Microsoft Fabric Community