Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
byr10112
Microsoft Employee
Microsoft Employee

Measure with Row Level Calculations

Hello,

I am trying to create a measure that will show me the full year forecast. There are 3 variables that go into the calculation. The measure:

Forecast = SUM(Revenue[Actuals]) + Sum(Revenue[Scheduled Revenue]) + SUM(Pipeline[Pipeline])

The tables are structured as follows:

 

Revenue:

Account IDDateActualsScheduled Revenue
100101/20/2022100 
100204/20/2022200 
100301/02/2022300 
100411/06/2022400 
100512/30/2022 500

 

Pipeline:

Account IDDatePipeline
100101/20/2023100
100204/20/2023200
100301/02/2023300
100405/06/2023400
100506/30/2023500

 

I have Account ID and Calendar tables both tables connect to with the respective columns

 

There are some instances where we convert the pipeline into revenue, but the revenue hasn't been recognized yet. For example, lets say account 1006 had pipeline due December 6th and we converted it into revenue, but the revenue won't show up until December 18th. The pipeline table only shows the open pipelines (not converted/lost). As such the between December 7th and 18th, the forecast for account 1006 is incorrectly displayed as 0. To overcome this, I created a new table called Won Pipeline:

 

Account IDWon DateWon Pipeline
100111/20/2022100
100212/01/2022200
100301/02/2022300
100411/06/2022400
100612/06/20221000

 

I want to update my Forecast measure to display the Won pipeline if the calculation for the forecast is 0 or blank. I changed my formula to this:

 

Forecast =
var _a= SUM(Revenue[Actuals]) + Sum(Revenue[Scheduled Revenue]) + SUM(Pipeline[Pipeline])

var _b= SUM(Won Pipeline[Won Pipeline])

RETURN

IF( OR(ISBLANK(_a), _a=0), _b,_a)

The problem is, when I want to see the all up forecast, Won Pipeline is not being included in DBF, as in an all up view, _a is not blank or not equal to 0. Is there a way to update my measure so the all up numbers include the won pipeline for the accounts where there is no revenue, scheduled revenue or open pipeline, but there is a Won Pipeline?

 

Thanks

6 REPLIES 6
jgeddes
Super User
Super User

Can you share what you wrote and the value(s) that are being returned?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





byr10112
Microsoft Employee
Microsoft Employee

I copy and pasted your formula and changed the table and field names accordingly. Account 1006 is still showing 0, for some other accounts pipeline and/or actuals are appearing as 0

Ok. Let's try and troubleshoot this. 

If I create a new calculated table with...

Forecast Table = 
var _vtable =
SUMMARIZE(
    accountTable,
    accountTable[Account ID],
    "_Forecast", IF(OR(ISBLANK(SELECTEDVALUE(revenueTable[Actuals]) + SELECTEDVALUE(pipelineTable[Pipeline]) + SELECTEDVALUE(revenueTable[Scheduled Revenue])), SELECTEDVALUE(revenueTable[Actuals]) + SELECTEDVALUE(pipelineTable[Pipeline]) + SELECTEDVALUE(revenueTable[Scheduled Revenue])=0), SELECTEDVALUE(wonPipelineTable[Won Pipeline]), SELECTEDVALUE(revenueTable[Actuals]) + SELECTEDVALUE(pipelineTable[Pipeline]) + SELECTEDVALUE(revenueTable[Scheduled Revenue]))
)
Return
_vtable

I get...

jgeddes_0-1670531046746.png

If you create a new table with that formula (changing the table/column names to match yours) what table do you get?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





byr10112
Microsoft Employee
Microsoft Employee

I tried doing this already. The same thing happened, for 1006 it appeared as 0

jgeddes
Super User
Super User

You can try the following measure (it is ugly, but it seems to work).

Forecast = 
var _vtable =
SUMMARIZE(
    accountTable,
    accountTable[Account ID],
    "_Forecast", IF(OR(ISBLANK(SELECTEDVALUE(revenueTable[Actuals]) + SELECTEDVALUE(pipelineTable[Pipeline]) + SELECTEDVALUE(revenueTable[Scheduled Revenue])), SELECTEDVALUE(revenueTable[Actuals]) + SELECTEDVALUE(pipelineTable[Pipeline]) + SELECTEDVALUE(revenueTable[Scheduled Revenue])=0), SELECTEDVALUE(wonPipelineTable[Won Pipeline]), SELECTEDVALUE(revenueTable[Actuals]) + SELECTEDVALUE(pipelineTable[Pipeline]) + SELECTEDVALUE(revenueTable[Scheduled Revenue]))
)
Return
SUMX(_vtable, [_Forecast])

I ended up with the result

jgeddes_0-1670521174808.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





byr10112
Microsoft Employee
Microsoft Employee

Its not giving me correct results. Not sure what is broken, but this is giving me a significantly lower number. 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.