Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have a table
Table: Sales
Fruits; Year; Euros
Apple; 2020; 5000
Apple; 2021; 6000
Grape;2020; 1000
Grape; 2021; 2000
How can I select the value of Euros for Grape in 2021?
I am creating a new measure which I would like to use part of the information from my table.
Should I use Selectvalues, values or filter?
Solved! Go to Solution.
Hi @Anonymous ,
Please try to create a measure like below and you can choose to use filter function or not :
Measure with filter function:
Measure1 =
CALCULATE (
MAX ( Sales[Euros] ),
FILTER ( ALL ( Sales ), Sales[Fruits] = "Grape" && Sales[Year] = 2021 )
)
Measure without filter function:
Measure2 =
CALCULATE (
MAX ( Sales[Euros] ),
Sales[Fruits] = "Grape",
Sales[Year] = 2021,
ALL ( Sales )
)
If I misunderstand your demands, please feel free to let me know.
Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Please try to create a measure like below and you can choose to use filter function or not :
Measure with filter function:
Measure1 =
CALCULATE (
MAX ( Sales[Euros] ),
FILTER ( ALL ( Sales ), Sales[Fruits] = "Grape" && Sales[Year] = 2021 )
)
Measure without filter function:
Measure2 =
CALCULATE (
MAX ( Sales[Euros] ),
Sales[Fruits] = "Grape",
Sales[Year] = 2021,
ALL ( Sales )
)
If I misunderstand your demands, please feel free to let me know.
Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
[what you want] =
calculate(
selectedvalue( Sales[Euros] ),
// keepfilters is here to honor
// any already existing filters
// on the table
keepfilters( Sales[Fruit] = "Grape" ),
keepfilters( Sales[Year] = 2021 ),
// use all( Sales ) if you want to
// remove all exising filters on Sales;
// if you want to keep them, then remove
// this line
all( Sales )
)
Hi,
Please try something like below.
Euros only for grape 2021 measure: =
CALCULATE (
SUM ( 'Sales'[Euros] ),
FILTER ( ALL ( 'Sales' ), 'Sales'[Fruits] = "Grape" && 'Sales'[Year] = 2021 )
)
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
9 | |
8 | |
8 |
User | Count |
---|---|
14 | |
12 | |
11 | |
11 | |
8 |