Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
AllanBerces
Post Prodigy
Post Prodigy

Less than or equal Today

Hi good day, can anyone help me correct my calculated column. what i required is there should be no value beyond <= Today

 

**bleep** Earned = CALCULATE(
    SUM('table'[Earned]),
    FILTER(
        ALL('table'),
        'table'[Task] = EARLIER('table'[Task]) &&
        'table'[Trade] = EARLIER('table'[Trade] ) &&
        'table'[PlanDate] <= EARLIER('table'[PlanDate])
       
    )
)
 
Thank you
1 ACCEPTED SOLUTION

Hi @Ritaf1983 thank you very much for the reply i got the solution

**bleep** Earned = CALCULATE(
    SUM('table'[Earned]),
    FILTER(
        ALL('table'),
        'table'[Task] = EARLIER('table'[Task]) &&
        'table'[Trade] = EARLIER('table'[Trade] ) &&
        'table'[PlanDate] = EARLIER('table'[PlanDate]) &&
         [PlanDate] <= TODAY()
  )
)

View solution in original post

2 REPLIES 2
Ritaf1983
Super User
Super User

Hi @AllanBerces 
Your current DAX formula calculates a Running Total (grouped by Task and Trade), which doesn't seem to align with your request to limit values based on today's date.

To help you fix this, a few points need clarification:

Logic Mismatch: There is no reference to TODAY() in your code. To limit values, you simply need a comparison like 'table'[PlanDate] <= TODAY().

Calculated Column Context: Why are you using an aggregation (SUM) and row-context navigation (EARLIER) if the goal is a simple filter? If you just want to display the value of the current row based on a date condition, you don't need CALCULATE or SUM.

Best Practice: EARLIER is considered legacy DAX. It is better to use Variables (VAR) for better readability and performance.

To provide a correct solution, please share:

A small sample of your source table.

An example of the expected result you want to see in the new column.

This will clarify if you actually need a running total that stops at today, or just a simple row-level check.

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Hi @Ritaf1983 thank you very much for the reply i got the solution

**bleep** Earned = CALCULATE(
    SUM('table'[Earned]),
    FILTER(
        ALL('table'),
        'table'[Task] = EARLIER('table'[Task]) &&
        'table'[Trade] = EARLIER('table'[Trade] ) &&
        'table'[PlanDate] = EARLIER('table'[PlanDate]) &&
         [PlanDate] <= TODAY()
  )
)

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.