ZN(LOOKUP(SUM([Profit]),0))
IF [Profit no gaps] >= 0 THEN NULL ELSEIF LOOKUP([Profit no gaps],-1) >= 0 MIN([Order Date])\} ELSE PREVIOUS_VALUE(#1/1/18#) END
LOOKUP([Profit no gaps],1)
IF [Profit no gaps] >= 0
THEN NULL
ELSEIF [Next Profit Value] >= 0
MIN([Order Date])\}
ELSE PREVIOUS_VALUE(#1/1/18#)
END
DATEDIFF('day', [Start Date], [End Date]) + 1
IF [Days in Streak] = 1 THEN
WINDOW_SUM(
IF [Days in Streak] = 1
THEN COUNTD([Order Date])
END
)
ELSEIF [Days in Streak] = 2 THEN
WINDOW_SUM(
IF [Days in Streak] = 2
THEN COUNTD([Order Date])
END
)
ELSEIF [Days in Streak] = 3 THEN
WINDOW_SUM(
IF [Days in Streak] = 3
THEN COUNTD([Order Date])
END
)
ELSEIF ...
END / [Days in Streak]
참고: 계산된 필드 [# of Streaks(연속 개수)] 및 [Keep only one date per streak group(연속 그룹당 하나의 날짜만 유지)]은 모든 가능한 연속 일수의 조건을 포함해야 합니다. 그 이유에 대한 추가 설명은 집계 필드를 사용하여 테이블 계산에서 세부 수준 정의를 참조하세요.
MIN([Order Date]) = WINDOW_MIN(IF[Days in Streak] = 1 THEN [Start Date] END)
OR MIN([Order Date]) = WINDOW_MIN(IF[Days in Streak] = 2 THEN [Start Date] END)
OR MIN([Order Date]) = WINDOW_MIN(IF[Days in Streak] = 3 THEN [Start Date] END)
OR ...
""
준비 흐름을 만드는 것은 보다 사전에 수행하는 작업이지만 준비 출력에서 뷰를 만드는 것은 테이블 계산으로 뷰를 만드는 것보다 훨씬 간단합니다. "Grouping Consequtive days.tflx" 준비 흐름은 다음 단계를 시연하며 오른쪽 패널에서 다운로드할 수 있습니다.
IF [Profit] < 0
THEN 'negative'
ELSE 'positive'
END
{ PARTITION [Category], [Condition] : { ORDERBY [Order Date] ASC : RANK_DENSE()}}
[Row Number(행 번호)] + 1
IF ISNULL(DATEDIFF('day', [Order Date-1], [Order Date]))
OR DATEDIFF('day', [Order Date-1], [Order Date]) > 1
THEN [Order Date]
END
{ PARTITION [Category], [Condition] : { ORDERBY [Start Date] ASC : RANK_DENSE()}}
[Row Number] - 1
IF ISNULL(DATEDIFF('day', [Order Date], [Order Date-1]))
OR DATEDIFF('day', [Order Date], [Order Date-1]) > 1
THEN [Order Date]
END
{ PARTITION [Category], [Condition] : { ORDERBY [End Date] ASC: RANK_DENSE()}}
DATEDIFF('day', [Start Date],[End Date])+1
준비 흐름 출력에는 조건(수익이 음수)에 부합하는 그룹과 조건에 부합하지 않는 그룹에 대한 시작 날짜가 포함됩니다. 필터를 "행 번호" 정리 단계에 추가하여 [Condition]='negative'만 남기고 조건에 부합하지 않는 그룹을 제외할 수 있습니다. 아니면 뷰에 [Condition(조건)] 필터를 추가해야 합니다.
001456688
989 KB
1685 KB

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.