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
Anonymous
Not applicable

cumulative total on the basis of date slicer

Hi,

 

My desired result is to get a row in the report in PowerBI desktop with two columns Item Number and Quantity where the quantity should be cumulative on the basis of date as a slicer. (For example: If I select a date, say 10-02-2020 in the slicer then the report should show only a single row with the columns, Item number 41225 and Quantity 25). For reference, the below dataset is there.

 

Kindly help how to achieve the desired result, whether I should write a Dax or any other way. 

 

Item number Date Quantity 
41225 10-01-2020 5 
41225 10-02-2020 15 
41225 10-04-2020 -5 
41225 10-08-2020 25 
41225 10-10-2020 -5 

 

 

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@Anonymous 
You can create a measure, I guess you mean Quantity = 20 if you select 2020.10.2

 

Measure = CALCULATE(SUM([Quantity]),FILTER(ALL('Table'),[Date]<=MAX([Date])))

 

V-pazhen-msft_0-1607579218899.png

V-pazhen-msft_0-1607579066330.png

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Paul Zheng,

 

Thank You for your support.

V-pazhen-msft
Community Support
Community Support

@Anonymous 
You can create a measure, I guess you mean Quantity = 20 if you select 2020.10.2

 

Measure = CALCULATE(SUM([Quantity]),FILTER(ALL('Table'),[Date]<=MAX([Date])))

 

V-pazhen-msft_0-1607579218899.png

V-pazhen-msft_0-1607579066330.png

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

Just drag Date to a slicer and drag Quantity to a visual and you are done

Anonymous
Not applicable

NO only drag will not give the cumulative of quantity depending on the slicer.

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!

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.