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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.