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
Hello good,
create a measure to calculate the treatment field for each row taking into account the ticket field of the previous and subsequent rows, taking into account that a filtering is carried out with the following measure, showing the results that are 1.
Thans!!
Solved! Go to Solution.
Hi @fjgarcia85 ,
I’d like to acknowledge the valuable input provided by @lbendlin . His initial ideas were instrumental in guiding my approach. However, I noticed that further details were needed to fully understand the issue.
In my investigation, I took the following steps:
I create two tables as you mentioned.
Then I create a measure by using your DAX codes.
filtro =
IF (
(
SELECTEDVALUE ( 'public h_cercoer_pendings'[fecha] ) >= MAX('Date'[fecha_minima])
&& SELECTEDVALUE ( 'public h_cercoer_pendings'[fecha] ) < MAX('Date'[fecha_maxima])
),
1,
0
)
Fianlly I create a calculated column to achieve your requirements.
Column =
VAR _CurrentTicket =
SELECTEDVALUE ( 'public h_cercoer_pendings'[ticket] )
VAR _PreviousTicket =
CALCULATE (
MAX ( 'public h_cercoer_pendings'[ticket] ),
FILTER (
ALL ( 'public h_cercoer_pendings' ),
'public h_cercoer_pendings'[ticket]
< EARLIER ( 'public h_cercoer_pendings'[ticket] )
)
)
RETURN
_PreviousTicket
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @fjgarcia85 ,
I’d like to acknowledge the valuable input provided by @lbendlin . His initial ideas were instrumental in guiding my approach. However, I noticed that further details were needed to fully understand the issue.
In my investigation, I took the following steps:
I create two tables as you mentioned.
Then I create a measure by using your DAX codes.
filtro =
IF (
(
SELECTEDVALUE ( 'public h_cercoer_pendings'[fecha] ) >= MAX('Date'[fecha_minima])
&& SELECTEDVALUE ( 'public h_cercoer_pendings'[fecha] ) < MAX('Date'[fecha_maxima])
),
1,
0
)
Fianlly I create a calculated column to achieve your requirements.
Column =
VAR _CurrentTicket =
SELECTEDVALUE ( 'public h_cercoer_pendings'[ticket] )
VAR _PreviousTicket =
CALCULATE (
MAX ( 'public h_cercoer_pendings'[ticket] ),
FILTER (
ALL ( 'public h_cercoer_pendings' ),
'public h_cercoer_pendings'[ticket]
< EARLIER ( 'public h_cercoer_pendings'[ticket] )
)
)
RETURN
_PreviousTicket
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
read about the WINDOW function.