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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I have an energy dataset and need to insert calculated rows (i.e. figure out the difference between the total and the other variables). I am using this approach: https://community.powerbi.com/t5/Desktop/Insert-custom-rows/m-p/731157#M352721 , i.e. generating a new table with rows and then merging those into the original table using the UNION function. My current solution is very ridgid and only gives me the calculated values for the first and last day of my dataset (which is one month). I would like to be able to see a higher resolution, i.e. calculate the "other" variable each day. I am not sure if I need to generate a row for each day or if it is possible to calculate it dynamically based on report level or other filters. Any suggestions? My current code looks like this:
custom rows =
VAR minTotalVal =
CALCULATE(
MIN(September[data.energy]),
FILTER(
ALL(September),
September[location.circuit] = "total"
)
)
VAR minSockets1Val =
CALCULATE(
MIN(September[data.energy]),
FILTER(
ALL(September),
September[location.circuit] = "sockets1"
)
)
VAR minSockets2Val =
CALCULATE(
MIN(September[data.energy]),
FILTER(
ALL(September),
September[location.circuit] = "sockets2"
)
)
VAR minSockets3Val =
CALCULATE(
MIN(September[data.energy]),
FILTER(
ALL(September),
September[location.circuit] = "sockets3"
)
)
VAR minLights1Val =
CALCULATE(
MIN(September[data.energy]),
FILTER(
ALL(September),
September[location.circuit] = "lights1"
)
)
VAR minLights2Val =
CALCULATE(
MIN(September[data.energy]),
FILTER(
ALL(September),
September[location.circuit] = "lights2"
)
)
VAR maxTotalVal =
CALCULATE(
MAX(September[data.energy]),
FILTER(
ALL(September),
September[location.circuit] = "total"
)
)
VAR maxSockets1Val =
CALCULATE(
MAX(September[data.energy]),
FILTER(
ALL(September),
September[location.circuit] = "sockets1"
)
)
VAR maxSockets2Val =
CALCULATE(
MAX(September[data.energy]),
FILTER(
ALL(September),
September[location.circuit] = "sockets2"
)
)
VAR maxSockets3Val =
CALCULATE(
MAX(September[data.energy]),
FILTER(
ALL(September),
September[location.circuit] = "sockets3"
)
)
VAR maxLights1Val =
CALCULATE(
MAX(September[data.energy]),
FILTER(
ALL(September),
September[location.circuit] = "lights1"
)
)
VAR maxLights2Val =
CALCULATE(
MAX(September[data.energy]),
FILTER(
ALL(September),
September[location.circuit] = "lights2"
)
)
RETURN
UNION(
ROW(
"accountId", LOOKUPVALUE(September[accountId],September[data.energy], minTotalVal),
"DateInt", LOOKUPVALUE(September[DateInt],September[data.energy], minTotalVal),
"received", LOOKUPVALUE(September[received],September[data.energy], minTotalVal),
"TimeKey", LOOKUPVALUE(September[TimeKey],September[data.energy], minTotalVal),
"data.energy", CALCULATE(
minTotalVal - minSockets1Val - minSockets2Val - minSockets3Val - minLights1Val - minLights2Val
),
"location.circuit", "others"
),
ROW(
"accountId", LOOKUPVALUE(September[accountId],September[data.energy], maxTotalVal),
"DateInt", LOOKUPVALUE(September[DateInt],September[data.energy], maxTotalVal),
"received", LOOKUPVALUE(September[received],September[data.energy], maxTotalVal),
"TimeKey", LOOKUPVALUE(September[TimeKey],September[data.energy], maxTotalVal),
"data.energy", CALCULATE(
maxTotalVal - maxSockets1Val - maxSockets2Val - maxSockets3Val - maxLights1Val - maxLights2Val
),
"location.circuit", "others"
)
)
Solved! Go to Solution.
I found a nice workaround that works without having to add rows to my table, see here:
https://community.powerbi.com/t5/Desktop/Waterfall-Chart-using-multiple-measures/m-p/643163/highligh...
I found a nice workaround that works without having to add rows to my table, see here:
https://community.powerbi.com/t5/Desktop/Waterfall-Chart-using-multiple-measures/m-p/643163/highligh...
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 |
---|---|
10 | |
6 | |
3 | |
3 | |
3 |
User | Count |
---|---|
13 | |
11 | |
9 | |
8 | |
8 |