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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
abc_777
Solution Specialist
Solution Specialist

calculation

Hi,

 

I have a calculation error

 

Target Quantity Company (Yearly) =
var a = CALCULATE([Same Month Previous Year Quantity],SAMEPERIODLASTYEAR(BMCalendar[Date]))
    return
        if(ISBLANK(a),[Same Month Previous Year Quantity], a * 1.2 )
 
abc_777_1-1686386034511.png

 

but expected result should be 4271791.66 * 1.2 =  5,126,149.992 but my Target Quantity Company (Yearly) gives me 2641923.67.

 

please correct me 

 

thanks


 

1 ACCEPTED SOLUTION
abc_777
Solution Specialist
Solution Specialist

its k i correct it

View solution in original post

2 REPLIES 2
Ritatyna
Regular Visitor

Looks like you made a mistake in your DAX. Try 
Target Quantity Company (Yearly) =
VAR a = CALCULATE([Same Month Previous Year Quantity], SAMEPERIODLASTYEAR(BMCalendar[Date]))
RETURN
IF(ISBLANK(a), [Same Month Previous Year Quantity] * 1.2, a * 1.2)

abc_777
Solution Specialist
Solution Specialist

its k i correct it

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.