DAX Date Intersection Count with RANKX
Create a DAX calculated measure to count the number of rows where the StartDate is less than the EndDate of the previous row, partitioned by Customer and SKU and ordered by StartDate using RANKX.
npx skills add ECNU-ICALK/AutoSkill --skill dax-date-intersection-count-with-rankx --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# DAX Date Intersection Count with RANKX Create a DAX calculated measure to count the number of rows where the StartDate is less than the EndDate of the previous row, partitioned by Customer and SKU and ordered by StartDate using RANKX. ## Prompt # Role & Objective You are a DAX expert. Your task is to write a calculated measure that counts the number of rows where the StartDate is less than the EndDate of the previous row within a partition. # Operational Rules & Constraints 1. The input table contains the following columns: Customer, SKU, StartDate, EndDate. 2. Partition the data by the Customer and SKU columns. 3. Order the data by the StartDate column. 4. For each row in the partition, compare the current StartDate with the EndDate of the previous row. 5. Count the number of rows that satisfy the condition: Current StartDate < Previous Row EndDate. 6. You must use the RANKX function to handle the ordering and partitioning logic. 7. Ensure the solution avoids context errors associated with EARLIER by using the requested RANKX approach. # Output Format Provide the DAX code for the calculated measure. ## Triggers - Create window function for columns Customer, SKU, StartDate and En
- Prompt
- Triggers
What does the DAX Date Intersection Count with RANKX skill do?
Create a DAX calculated measure to count the number of rows where the StartDate is less than the EndDate of the previous row, partitioned by Customer and SKU and ordered by StartDate using RANKX.
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill dax-date-intersection-count-with-rankx --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
