Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hi all,
i have a table like this:
activity hour value
A 2 10
B 3 15
C 4 20
By default value is calculated hour*5.
My goal is to set some parameters (or custom table) to multiply hour with a different cost for each activity.
For example hourly cost for activity A to 20, so value has to be 40.
For activity B 10 per hour, so value has to be 30. And for activity C default value.
The goal is to edit those hourly cost with a parameter (or edit values in a table).
Any suggestions?
Regards,
Francesco
Hi @FrancescoSCP ,
You could use SWITCH() function to get a new column or measure:
Column =
SWITCH (
test[activity],
"A", test[hour] * 20,
"B", test[hour] * 10,
test[hour] * 5
)
Measure =
VAR a =
SELECTEDVALUE ( test[activity] )
VAR b =
SELECTEDVALUE ( test[hour] )
RETURN
SWITCH ( SELECTEDVALUE ( test[activity] ), "A", b * 20, "B", b * 10, b * 5 )
Here is the result.
Create a table with an hourly cost of the activity.
Join this with this table.
Using lookup value, populate the value in a column for the current table
https://docs.microsoft.com/en-us/dax/lookupvalue-function-dax
.Create another column to multiply the two
Hi,
yes it works but the end user cannot edit the hourly cost.
The best would be a write back option: with power apps i can only connect to cloud SQL server with my free account. To use data gateway it requires a plan.
Any suggestion?
Regards,
Francesco
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 79 | |
| 38 | |
| 31 | |
| 27 | |
| 27 |