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 dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello
I have a DAX question about remove filters:
This is my measure:
_AverageMachineHoursV1 =
CALCULATE (
AVERAGEX (
FILTER (
DIM_Date,
YEAR ( [Date] )
= YEAR ( [_SelectedDate] ) - 1
&& NOT ( [DayOfWeekNumber] IN { 6, 7 } )
),
CALCULATE ( SUM ( FACT_Productivity[MHOURS] ) )
),
REMOVEFILTERS ( DIM_Machine ),
REMOVEFILTERS ( DIM_Department )
)
With this measure I just want a sum of the total machine hours of last year ignoring the filters on DIM_Department and DIM_Machine. I just want the average of machines hours filtered on weeknumber.
What I want is that after the result I want to keep the aggregation result but when I select a department, it only shows the machines that are related to the selected department. Like in the image below, I selected department 'B' and I expect is that machine "0000B" is removed from table but still keeping the average results. Is that possible? Even with my data model?
Thank you
Kind regards
Solved! Go to Solution.
You could create a measure like
Is Visible =
IF (
SELECTEDVALUE ( DIM_Machine[DepartmentID] )
IN VALUES ( DIM_Department[DepartmentID] ),
1
)
and add that as a filter to visual, to only show when the value is 1.
Hello,
Did the solution johnt75 offered help you solve the problem, if it helps, you can consider to accept it as a solution so that more user can refer to, or if you have other quertsions, can provide some information so that can offer more suggestion for you.
Best Regards!
Yolo Zhu
You could create a measure like
Is Visible =
IF (
SELECTEDVALUE ( DIM_Machine[DepartmentID] )
IN VALUES ( DIM_Department[DepartmentID] ),
1
)
and add that as a filter to visual, to only show when the value is 1.
User | Count |
---|---|
76 | |
75 | |
46 | |
31 | |
27 |
User | Count |
---|---|
99 | |
91 | |
51 | |
48 | |
47 |