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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Cocrodile
Helper I
Helper I

Data forecast

IMG2.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The formulas I used :

----------------------------------------------
A-B = sum(TABLE[A])-sum(TABLE[B])
------------------
V1 = calculate ([C] ,filter (TABLE,TABLE[key]=14) )
---------------------------------------------
V2=stocks = calculate ([V1] , ALL(TABLE)
---------------------------------------------
V3= if ([C]=BLANK() && [V2]<>BLANK() ,[V2]+[A-B],[C])
---------------------------
V4 = if( sum(TABLE[key])=15,[V3])
------------
V5 = if ([C]=BLANK() ,[V4],[C])
----------------------------------

I should calculate all the expected values up to month 7 as in column V5 but I only made one step.

The 54 in is the result in V5 = 77 -23.

77 is the last C value -23 is A-B.

I need a formula that takes all the written formulas and does this calculation for me dynamically.

Thank you it is very urgent

 

 

4 REPLIES 4
v-zhangti
Community Support
Community Support

Hi, @Cocrodile 

 

What do you expect the output to look like? Can you show it in a picture?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I expect V5

Hi, @Cocrodile 

 

You can try the following methods.

Measure = 
Var _AB=SUM('Table'[A])-SUM('Table'[B])
Var V2=CALCULATE(SUM('Table'[C]),FILTER(ALL('Table'),[Key]=14))
Var V3=IF(SELECTEDVALUE('Table'[C])=BLANK()&&V2<>BLANK(),V2+_AB,SUM('Table'[C]))
Var V4=IF(SUM('Table'[Key])=15,V3)
Var V5=IF(SELECTEDVALUE('Table'[C])=BLANK(),V4,SUM('Table'[C]))
return
V5

vzhangti_0-1659089995026.png

Is this the result you expect? A formula to calculate V5.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I am looking for a way to calculate all the data up to the end of the year

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors