Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
Hope someone can shed some light on my problem.
I have a stock movement calculation which is pivoted by col = sku and row= year.
The problem is that the table has to be filtered to the correct movement types.
example.
This works for running total:
CALCULATE(SUM('Table'[TrueQuantity]), DimDates[Date] <= MaxDate , ALL(DimDates) )
this does not:
CALCULATE(SUM(MovementsInOut[TrueQuantity]), FILTER( MovementsInOut , movementsInOut[movementtype] IN {100,392,227,235,225}), DimDates[Date] <= MaxDate , ALL(DimDates) )
I would like to avoid creating an additional table to the model so if the filter can work within the calculation that would be perfect
thank you
Mike
@mmanwaring , Try like
CALCULATE(SUM(MovementsInOut[TrueQuantity]), FILTER( MovementsInOut , movementsInOut[movementtype] IN {100,392,227,235,225}), filter(all(DimDates) ,DimDates[Date] <= MaxDate ))
Hi, Thank you for your reply.
It does however not change the results.
Mike
@mmanwaring ,
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Hi amitchandak
----
Thank you Mike
@mmanwaring , No access, applied for it
Hi
The measure works fine until i add the filter for the movement types then it breaks. It will be ok if i make a new table but not if i calculate a new table within the measure?
Thanks Mike
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |