Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin 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 Tasks table with this data
And I need to show data in such way with filters
Notice that I don't want to show Release Areas in the filters on the report screen
Now, I need a measure that when we select Area, it should show Hrs of the person for the respective related Release Area (for e.g. Release\Area 1 in the above shown example)
I have written a measure, but it's showing hrs for all records, instead of only one , like this below -
Measure is like this -
Here is the Power BI File
Solved! Go to Solution.
I would use Power Query to split out the base area as a new column on the area master table and use that on the slicer. Then amend the measure to be
Release Hrs =
VAR AreaFilter = TREATAS( SELECTCOLUMNS( VALUES( 'Area Master'[Area] ), "@release", "Core\Release\" & 'Area Master'[Area] ), 'Area Master'[Area Path] )
VAR IterationFilter = VALUES( 'Iteration Master'[Iteration Path] )
RETURN CALCULATE( SUM( 'Tasks'[Hrs] ), AreaFilter, IterationFilter )
See the attached file.
Try
Release Hrs =
VAR AreaFilter =
TREATAS(
SELECTCOLUMNS(
VALUES( 'Area Master'[Area Path] ),
"@release", "Release\" & 'Area Master'[Area Path]
),
'Area Master'[Area Path]
)
VAR IterationFilter =
VALUES( 'Iteration Master'[Iteration Path] )
RETURN
CALCULATE(
SUM( 'Tasks'[Hrs] ),
AreaFilter,
IterationFilter
)
@johnt75 Sorry, I missed adding a Word "Core\" to the Area path.
When I have that, this measure is not working anymore.
Please take a look at this PBI file
I would use Power Query to split out the base area as a new column on the area master table and use that on the slicer. Then amend the measure to be
Release Hrs =
VAR AreaFilter = TREATAS( SELECTCOLUMNS( VALUES( 'Area Master'[Area] ), "@release", "Core\Release\" & 'Area Master'[Area] ), 'Area Master'[Area Path] )
VAR IterationFilter = VALUES( 'Iteration Master'[Iteration Path] )
RETURN CALCULATE( SUM( 'Tasks'[Hrs] ), AreaFilter, IterationFilter )
See the attached file.
Got it.. Thanks a lot !
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
16 | |
8 | |
7 | |
7 | |
6 |
User | Count |
---|---|
23 | |
11 | |
10 | |
10 | |
8 |