Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I'm experiencing a problem when trying to use two slicers to select data for my visualization - here's a summary:
Problem Summary
Objective: I want to create a measure in Power BI that sums the hours for staff members based on two conditions:
• The hours for the selected Team, regardless of the Delivery Portfolio, plus
• The hours for the Team = "Team Two" where the Delivery Portfolio matches the selected value.
Current Setup:
• I have a matrix visualization that shows 'Export'[Staff Name] in the Rows, Weeks in the Columns, and the sum of 'Export'[Hours] in Values.
• I have a slicer to select the Team ('Export'[Team]).
• I also have a slicer to select the Delivery Portfolio ('Export'[Delivery Portfolio]).
Challenges:
• Ensuring that the measure correctly sums the hours for the selected Team without being affected by the Delivery Portfolio.
• Including the hours for "Team Two" where the Delivery Portfolio matches the selected value, without duplicating totals or missing data.
Can anyone please advise how I should approach this?
Thanks!
I hope this below expression solves your requirements
Var __SelectedTeam = Selectedvalue(Export[Team])
Var __SelectedDeliveryPosition = Selectedvalue(Export[Delivery Postion])
Var __measure1 = calculate(sum(Export[Hours]), REMOVEFILTERS(Export[Delivery Postion]))
Var __measure2 = Calculate(sum(Export[Hours]), Export[Team] = "Team Two")
Return __measure1 + __measure2
For further assitance, please share the sample data and expected output
Need a Power BI Consultation? Hire me on Upwork
Connect on LinkedIn
|
Hi and thanks for your response. I’m not familiar with the use of variables, but I have translated your code to the following:
CombinedHours =
VAR __SelectedTeam = SELECTEDVALUE('Export'[Team])
VAR __SelectedDeliveryPortfolio = SELECTEDVALUE('Export'[Delivery Portfolio])
VAR __measure1 = CALCULATE(SUM('Export'[Hours]), REMOVEFILTERS('Export'[Delivery Portfolio]))
VAR __measure2 = CALCULATE(SUM('Export'[Hours]), 'Export'[Team] = "Team Two" && 'Export'[Delivery Portfolio] = __SelectedDeliveryPortfolio)
RETURN __measure1 + __measure2
What I’m trying to achieve is:
Can you please advise how to amend the DAX formula above to achieve this? And further advice would be greatly appreciated.
Thanks!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 7 | |
| 6 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 18 | |
| 14 | |
| 14 |