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
Anonymous
Not applicable

Measure not Filtering Calculation

Hi people, I'm just hitting against a wall with this one. 

 

I have a calculate function in DAX where I want to sum a column:

 

Soldadura =
CALCULATE (
    SUM ( WM[Diámetro Neto] ),
    FILTER ( WM, WM[FECHA SOLDADURA (UNION)] > [Fecha Corte Media] )
)

 

Where

- [Diámetro Neto] and [FECHA SOLDADURA (UNION)] are columns in my fact table, first one format is a number and the 2nd one is a date

- [Fecha Corte Media] is a measure from a Date minus a parameter which is a integer

 

The above expresion does the sum, but it is not filtering so I get the total, and I don't know why

 

If I substitute [Fecha Corte Media] by a DATE(YYYY,MM,DD), it works fine, also, a very similar expresion in a different table works fine:

 

 

Festivos desde Corte =
CALCULATE (
    COUNT ( Festivos[Festivos] ),
    FILTER (
        Festivos,
        Festivos[Festivos] > [Fecha Corte Media]
            && Festivos[Festivos] <= [Fecha Actualización]
    )
)

 

 

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

According to your description, I create a sample and the result works fine,  I think it is possible that the type and writing of the measure “Fecha Corte Media” cause your problem.

vkalyjmsft_0-1635833452827.png

 

vkalyjmsft_1-1635833452834.png

 

Best Regards,
Community Support Team _ kalyj

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

View solution in original post

3 REPLIES 3
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

According to your description, I create a sample and the result works fine,  I think it is possible that the type and writing of the measure “Fecha Corte Media” cause your problem.

vkalyjmsft_0-1635833452827.png

 

vkalyjmsft_1-1635833452834.png

 

Best Regards,
Community Support Team _ kalyj

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

Anonymous
Not applicable

Actually, I modify the DB structure to simplify it and now it works. I was making a mistake, probably because the relationship between the data and where the measuere was coming from.

Fowmy
Super User
Super User

@Anonymous 

Not enough information about the model and the calculation, check your relationships and the current filter context where you are running this measure. Can you try the following version? 

Soldadura =
var __fecha = [Fecha Corte Media]
Return
CALCULATE (
    SUM ( WM[Diámetro Neto] ),
    WM[FECHA SOLDADURA (UNION)] > __fecha 
)

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
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.