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.
Hello!
Can someone help me? How can I use a metric by filtering the slice in expression calculate?
Exemple:
SelectedSLICE = MIN('FatoMeta Budget MP e Horas'[idMes])
Meta Budget MP = CALCULATE(SUM('FatoMeta Budget MP e Horas'[Meta MP]);'FatoMeta Budget MP e Horas'[idMes]<[SelectedSLICE])/1000
Solved! Go to Solution.
Hi @Hubner,
So I think you need to add a filter statement into your calculate solution since you're referencing a DAX measure in the filter. I also like to think of DAX Measures as building blocks, since there is a good chance you'd want to reference the SUM of Meta MP in another formula, why not give that its own DAX Measure that other formulas can reference? So I'd do this in two steps.
First Formula:
[SUM of Meta MP] = SUM ( 'FatoMeta Budget MP e Horas'[Meta MP] )
Second Formula:
Meta Budget MP = CALCULATE ( [SUM of Meta MP], FILTER ( 'FatoMeta Budget MP e Horas', [idMes] < [SelectedSLICE] ) ) / 1000
By the way, if you ever want to easily format your DAX Formulas. DAX Formatter is a great website for that. 🙂
Best Regards,
Reid Havens - Owner | Founder
Hi @Hubner,
So I think you need to add a filter statement into your calculate solution since you're referencing a DAX measure in the filter. I also like to think of DAX Measures as building blocks, since there is a good chance you'd want to reference the SUM of Meta MP in another formula, why not give that its own DAX Measure that other formulas can reference? So I'd do this in two steps.
First Formula:
[SUM of Meta MP] = SUM ( 'FatoMeta Budget MP e Horas'[Meta MP] )
Second Formula:
Meta Budget MP = CALCULATE ( [SUM of Meta MP], FILTER ( 'FatoMeta Budget MP e Horas', [idMes] < [SelectedSLICE] ) ) / 1000
By the way, if you ever want to easily format your DAX Formulas. DAX Formatter is a great website for that. 🙂
Best Regards,
Reid Havens - Owner | Founder
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 |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |