Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
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, Better Weighted Average per Category, Better Filtered Value, Better Sales from New Customers, Year to Date Total, and Better Year Over Year Change. This one tackles Total for Category.
Power BI's Total for Category quick measure returns something like this:
Value total for Month =
CALCULATE(
SUM('Table'[Value]),
ALLSELECTED('Dates'[Month]),
ALLSELECTED('Dates'[MonthSort])
)
Perhaps a better way:
Better Total for Category 1 =
VAR __Table = ALLSELECTED('Table'[Month])
RETURN
SUMX(FILTER('Table',[Month] IN __Table),[Value])
Watch the video!
eyJrIjoiZTY2ZjQ2NWEtNmYwMy00OGNhLTgxODUtZmYzNDNiNDVkYjU5IiwidCI6IjRhMDQyNzQzLTM3M2EtNDNkMi04MjdiLTAwM2Y0YzdiYTFlNSIsImMiOjN9