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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Calculating Variance based on a Target

Need help with a calculation on variance for sales target. 

 

I have 1 table with the Sales information with Sales recorded by the Teams and the second with Traget qty by teams. 

 

DateOrderTeamQtyGroupCustomer
1-Jun-201000Team A20GRP1100
1-Jul-201001Team A50GRP1101
1-Aug-201002Team B100GRP2102
1-May-212000Team A125GRP2103
1-May-212001Team A100GRP1101
1-Nov-201001Team A250GRP1101
1-Nov-211001Team A400GRP1101

 

Second table have the target for the Fiscal Year by Teams

FYTeamTarget QtyGroupCustomer
FY21Team A2000GRP1100
FY22Team A3500GRP2101
FY21Team B1800GRP3102
FY22Team B3000GRP4103

 

I created a key to look up the Target qty from the Target info for the fact. But my issue is with the variance calculation. 

 

Filter is for the Fiscal Year Month. FY ends 04/30. 

 

Last Year Sale = CALCULATE(SUM(Fact[Qty]),DATESYTD(ENDOFYEAR(dateadd('calendar'[Date],-1,Year),"04/30"),"04/30"))

How should i do measure on variance? 

For the selected fiscal year Month of Nov 2021, 

Expected result is to 

TeamLast YearTargetVarianceCur Year MTD
Team A3202000-1680400
     

 

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , In year table, create a year-end date date based on FY

example

Date = Date(right([FY],2), 3, 31)  // Use + with FY wif needed  Date(right([FY],2) +1 , 3, 31) 

 

then refer

Distributing/Allocating the Yearly Target(Convert to Daily Target): Measure ( Daily/YTD): Magic of CLOSINGBALANCEYEAR With TOTALYTD/DATESYTD: https://community.powerbi.com/t5/Community-Blog/Power-BI-Distributing-Allocating-the-Yearly-Target-Convert-to/ba-p/1476400

 

Distributing/Allocating the Monthly Target(Convert to Daily Target): Measure ( Daily/MTD): https://community.powerbi.com/t5/Community-Blog/Power-BI-Distributing-Allocating-the-Monthly-Target-Convert-to/ba-p/1657798

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thanks @amitchandak .  My request is totally different. Sorry if i did not made it clear. 

 

I am trying to get the  calculation as below

Varaince from Target =   Target from Target Table  -  Total Sales Measure 

 

Noticed that i mistyped the Target in the expected result. 

 

 

 

TeamLast YearTargetVarianceCur Year MTD
Team A3203500-3180400
     

 

 

Pbix is here - https://drive.google.com/file/d/19UqWP2xwWK5eB4S2CUngc5abiWCHHIDG/view?usp=sharing

 

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.