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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
apkmnp
Frequent Visitor

Looking to restrict Total column calculation over specific months data only

Hi Team,

 

I am trying to calculate simple %variance formula based on (Actuals- Fcst)/(Fcst) for my data.

At monthly level, this is working fine, however for some months we do not have actuals but the forecast data only but the Total Year level calculation is considering even the months where actuals data is not available by default and giving incorrect picture. 

Any ways to resolve this by exclusion of those months at Total level? More details attached in screenshot.

 

The total number should be (43,883,038 -  44,393,311)/(44,393,311) or -1.15% however this is coming as -46.2% right now

 

apkmnp_2-1662375999338.png

 

Thanks in advance for your inputs!!

 

Best Regards,

apkmnp

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@apkmnp , Try like

 

Measure =

var _for = sumx(filter(Values(Table[Month Year]), not(isblank([Actual])) ), [Target])

return

divide([Actual] -_for,_For)

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@apkmnp , Try like

 

Measure =

var _for = sumx(filter(Values(Table[Month Year]), not(isblank([Actual])) ), [Target])

return

divide([Actual] -_for,_For)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.