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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi guys,
I need have a measure that takes the value depending on the progress of a task.
I need to take them totals and spread it across a project.
| Project | Task | Value | DESIRED |
| 1 | A | 10 | 45 |
| 1 | B | 15 | 45 |
| 1 | C | 20 | 45 |
| 2 | A | 5 | 30 |
| 2 | B | 10 | 30 |
| 2 | C | 15 | 30 |
This is what i need based on my current table.
I have this measure which works:
Change Val Total = CALCULATE(SUM('Table1'[Value]), ALLEXCEPT('Table1', 'Table1'[Project], 'Table1'[Date]))
Solved! Go to Solution.
Hi, @paulfink
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Table:
Value(Measure):
Value =
var _pro = SELECTEDVALUE('Table'[Project])
var _task = SELECTEDVALUE('Table'[Task])
return
SWITCH(
_pro,
1,
SWITCH(
_task,
"A",10,
"B",15,
"C",20
),
2,
SWITCH(
_task,
"A",5,
"B",10,
"C",15
)
)
You may create a measure like below.
Desired =
var tab =
SUMMARIZE(
ALL('Table'),
'Table'[Project],
'Table'[Task],
"Value",
var _pro = 'Table'[Project]
var _task = 'Table'[Task]
return
SWITCH(
_pro,
1,
SWITCH(
_task,
"A",10,
"B",15,
"C",20
),
2,
SWITCH(
_task,
"A",5,
"B",10,
"C",15
)
)
)
return
SUMX(
FILTER(
tab,
[Project]=SELECTEDVALUE('Table'[Project])
),
[Value]
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @paulfink
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Table:
Value(Measure):
Value =
var _pro = SELECTEDVALUE('Table'[Project])
var _task = SELECTEDVALUE('Table'[Task])
return
SWITCH(
_pro,
1,
SWITCH(
_task,
"A",10,
"B",15,
"C",20
),
2,
SWITCH(
_task,
"A",5,
"B",10,
"C",15
)
)
You may create a measure like below.
Desired =
var tab =
SUMMARIZE(
ALL('Table'),
'Table'[Project],
'Table'[Task],
"Value",
var _pro = 'Table'[Project]
var _task = 'Table'[Task]
return
SWITCH(
_pro,
1,
SWITCH(
_task,
"A",10,
"B",15,
"C",20
),
2,
SWITCH(
_task,
"A",5,
"B",10,
"C",15
)
)
)
return
SUMX(
FILTER(
tab,
[Project]=SELECTEDVALUE('Table'[Project])
),
[Value]
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@amitchandak I have already tried that and it does not work.
I need the value to be a measure so please reference it as Value1.
updated
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |