Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
Continuing with exploring alternatives to Power BI's default quick measures that don't involve the CALCULATE function, such as Better Running Total, Better Average per Category, and Better Weighted Average per Category, this one is for Better Filtered Value.
Power BI's Filtered Value returns something like this:
Value for February, March, June, or September =
CALCULATE(
SUM('Table'[Value]),
'Table'[Month] IN { "February", "March", "June", "September" },
ALL('Table'[MonthSort])
)
Much of this calculation is unnecessary, like the ALL statement that introduced itself by magic because I had a Sort By column on my Month column. A potentially better way that is more intuitive uses an X aggregator like so:
Better Filtered Value 2 =
VAR __Table = FILTER('Table', [Month] IN { "February", "March", "June", "September" })
RETURN
SUMX(__Table,[Value])
Watch the video!
eyJrIjoiOThkNDBiODMtNWJlMi00NzcwLWFhZTYtZjcwYzA4ZDliY2Q5IiwidCI6IjRhMDQyNzQzLTM3M2EtNDNkMi04MjdiLTAwM2Y0YzdiYTFlNSIsImMiOjN9