Forum Discussion
Summarise measure values by groups
- 1 year ago
First create a numeric parameter to store the possible values of the measure, ranging from -100 to 100 with an increment of 10. Untick the option to add a slicer to the page, as you won't need it.
Next you need to understand which tables and columns you are summarizing the measure by. For the sake of example I will summarize the Sales table by product category and month.
Create a measure like
Num occurences = VAR CurrentValue = [Parameter Value] VAR SummaryTable = ADDCOLUMNS ( SUMMARIZE ( Sales, 'Date'[Year month], 'Product'[Category] ), "@num", [Measure you want to count] ) VAR Result = COUNTROWS ( FILTER ( SummaryTable, [@num] = CurrentValue ) ) RETURN ResultFinally, create a visual using the parameter table you created and the new measure.
First create a numeric parameter to store the possible values of the measure, ranging from -100 to 100 with an increment of 10. Untick the option to add a slicer to the page, as you won't need it.
Next you need to understand which tables and columns you are summarizing the measure by. For the sake of example I will summarize the Sales table by product category and month.
Create a measure like
Num occurences =
VAR CurrentValue = [Parameter Value]
VAR SummaryTable =
ADDCOLUMNS (
SUMMARIZE ( Sales, 'Date'[Year month], 'Product'[Category] ),
"@num", [Measure you want to count]
)
VAR Result =
COUNTROWS ( FILTER ( SummaryTable, [@num] = CurrentValue ) )
RETURN
Result
Finally, create a visual using the parameter table you created and the new measure.