Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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]
)
)
Solved! Go to Solution.
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.
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.
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.
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.
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.
@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
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
User | Count |
---|---|
50 | |
24 | |
19 | |
18 | |
14 |
User | Count |
---|---|
91 | |
86 | |
39 | |
25 | |
21 |