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
abc_777
Post Prodigy
Post Prodigy

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

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)

its k i correct it

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.