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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Syndicate_Admin
Administrator
Administrator

Cumulative count in matrix filtered by date

Good afternoon, I would appreciate it very much if you can help me

The case is as follows:

I have two tables with data

The first table is:

DiegoMB_0-1658876528700.png

from where we will take the categories for the matrix.

The second table is:

DiegoMB_1-1658876637409.png

From this we will take those that are from July 1 and 2, 2022.

What I am looking for is to be able to make the following matrix:

DiegoMB_2-1658876736773.png

What I need is for July 2, 2022 to add the value of the previous day plus the value of July 2.

Please note that from table 2 there is data from other dates which I do not want to bring to the matrix and that I would prefer to do it within the DAX formula and not with external filters.

One more doubt: if you wanted to bring the accumulated of the previous month, that is, the figure of 30/06/2022, it can be done and how it would be done???.

I thank you for the yuda.

2 REPLIES 2
danextian
Super User
Super User

Hi @Syndicate_Admin ,

 

You can do something like

cumulative sum =
CALCULATE (
    SUM ( table[value] ),
    FILTER (
        ALL ( table[date] ),
        table[date] <= MAX ( table[date] )
    ) //to create a sum of values where  date is less than or equal to the date in the current filter context
)









Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Thank you very much, I already tried the formula, but it does NOT work, for some reason I accumulate the figures since 2020 by category but does not filter me those of the month.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.