Forum Discussion
iW1DOV
Helper II
1 year agoHow to filter for all or single value?
This is my requirement: I have a sales volumes table; there is a row for each sale a store made, for each day of the year. Each row is marked with a flag Comparable - 1 means "Comparable", 0 means ...
- 1 year ago
One approach is to use a field parameter. First create the two measures below, and then create a field parameter using these measures.
All = SUM ( Sales[Amount] )Comparable only = CALCULATE ( [All], Sales[Comparable] = 1 )Field parameter (created via the user interface as explained in the article below):
Parameter = { ("All", NAMEOF('Measure'[All]), 0), ("Comparable only", NAMEOF('Measure'[Comparable only]), 1) }Use 'Parameter'[Parameter] in a visual:
-----
https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-field-parameters
DataInsights
Super User
1 year ago
One approach is to use a field parameter. First create the two measures below, and then create a field parameter using these measures.
All = SUM ( Sales[Amount] )Comparable only = CALCULATE ( [All], Sales[Comparable] = 1 )
Field parameter (created via the user interface as explained in the article below):
Parameter = {
("All", NAMEOF('Measure'[All]), 0),
("Comparable only", NAMEOF('Measure'[Comparable only]), 1)
}
Use 'Parameter'[Parameter] in a visual:
-----
https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-field-parameters