cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
admin11
Impactful Individual
Impactful Individual

How to make my YTD Qty display as 176 ?

Hi All

I have a expression which compute YTD Qty sold. 

 

Sales YTD QTY =
var _max = today()
return
calculate(TOTALYTD(sum('SALES'[quantity]),'Date'[Date]),filter('Date','Date'[Date]<=_max))
 
Above expression seen correct , but not sure why it not return 176 ?

admin11_0-1620559244767.png

My PBI file

https://www.dropbox.com/s/p5ce3p3juf2sux8/PBS_VER050%20SI_PM.pbix?dl=0

 

Paul

 

1 ACCEPTED SOLUTION
v-xiaotang
Community Support
Community Support

Hi @admin11 

Not clear about the result you want, but if you want to make Sales YTD QTY display as quantity, try this:

Create the measure:

YTD test = calculate(SUM(SALES[quantity]),DATESYTD(DATEADD('Date'[Date],0,YEAR)))

v-xiaotang_0-1620710937349.png

 Hope this helps.

 

Best Regards,

Community Support Team _ Tang

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

View solution in original post

3 REPLIES 3
v-xiaotang
Community Support
Community Support

Hi @admin11 

Not clear about the result you want, but if you want to make Sales YTD QTY display as quantity, try this:

Create the measure:

YTD test = calculate(SUM(SALES[quantity]),DATESYTD(DATEADD('Date'[Date],0,YEAR)))

v-xiaotang_0-1620710937349.png

 Hope this helps.

 

Best Regards,

Community Support Team _ Tang

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

View solution in original post

Fowmy
Super User IV
Super User IV

@admin11 

You simply use the formula as follows:

Sales YTD Qty = TOTALYTD(sum('SALES'[quantity]),'Date'[Date])

 

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Blog - Data Visualization

Website   YouTube    LinkedIn   PBI User Group

sayaliredij
Solution Supplier
Solution Supplier

Hi @admin11 

 

You can create the following formula for Total Quantity

 

Total Quantity = SUM(SALES[quantity])
 
and use this formule for YTD
 
Total Quantity YTD = 

    TOTALYTD([Total Quantity], 'Date'[Date].[Date])
 
Regards,
Sayali

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

 

 

 

Helpful resources

Announcements
MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Urdu Hindi D365 Bootcamp 768x460.png

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors