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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

accumulate count values in time accordance

Capture.PNGHi. I have thousands of row look like this table. This table has data from 2008 and I used a formula below to count the number of the machines upto 2015.

 

Machine Quantity = CALCULATE(COUNT(Table[MachineId]),FILTER(ALL(Table[Delivered]),'Table'[Delivered]<DATE("2015",1,1)))

 

I want to creat a visual that present the add of the number of machines in each month from January 2015 upto most recent month. In each month, there are number of machines delivered therefore I want to show in in month/year accordingly in addition to number of machines in 2015.

 

Can anyone help me to build a formula for this?

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @Anonymous,

 

Please try this measure:

Accumulate count per month =
CALCULATE (
    COUNT ( 'Table'[MachineID] ),
    FILTER (
        ALL ( 'Table'[Delivered] ),
        'Table'[Delivered] > DATE ( 2015, 1, 1 )
            && 'Table'[Delivered] <= MAX ( 'Table'[Delivered] )
    )
)

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi,

 

I have a similar problem. Could anyone show me a standard dax?
I have this table:

CourseTotal HoursStard DateEnd Date
110001/07/201908/09/2019
25005/03/201908/06/2019
33521/07/201921/09/2019
41515/09/201908/12/2019

 

I need to show accumulative hours from thouse dates. The thing is that if i show this on a visualization, i can only put on X axis only one date, Start or End Date. How can i manage this?

 

Thanks

v-yulgu-msft
Employee
Employee

Hi @Anonymous,

 

Please try this measure:

Accumulate count per month =
CALCULATE (
    COUNT ( 'Table'[MachineID] ),
    FILTER (
        ALL ( 'Table'[Delivered] ),
        'Table'[Delivered] > DATE ( 2015, 1, 1 )
            && 'Table'[Delivered] <= MAX ( 'Table'[Delivered] )
    )
)

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
dilumd
Solution Supplier
Solution Supplier

Hi @Anonymous

 

I'm not sure whether I understood your problem correctly, however I did below change and got into below chart. On the date hierarchy you should remove date and the quarter part.

1.JPG

Anonymous
Not applicable

Hi @dilumd. Thanks for your reply.

I don't think I explained my problem correctly. I need to add number of machines every month so it can accumulate on prior month rather than showing how many were added each month. Is there any way I can do that?

@Anonymous

 

You mean monthly cumulative count?

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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