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
hemingt
Helper V
Helper V

How to cumulative of the count until the current week

Hello,

 

In order to clarify my question, I create a demo data excel. https://1drv.ms/x/s!AsM9bO8zGUN6qnXhW_xy3NskH3jT

 

I want to show the cumulate count of incoming issues and out issues week over week.

Such as 

1901 1

1902 1+2 =3

1903 1+2+1=4

1904 1+2+1+2=6

and so on

 

Do you know how to do? Thank you!

1 ACCEPTED SOLUTION
v-cherch-msft
Employee
Employee

Hi @hemingt 

You may create measures like below:

Count = 
CALCULATE (
   DISTINCTCOUNT ( Sheet2[Key] ),
    FILTER (
        GENERATE ( Sheet1, Sheet2 ),
        Sheet1[Week] >= Sheet2[Create_Week]
            && Sheet1[Week] <= Sheet2[Close_Week]
    )
)
cumulative_count =
IF (
    NOT ( ISBLANK ( [Count] ) ),
    CALCULATE (
        [Count],
        FILTER ( ALL ( Sheet1 ), Sheet1[Week] <= MAX ( Sheet1[Week] ) )
    )
)

Regards,

Community Support Team _ Cherie Chen
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

7 REPLIES 7
v-cherch-msft
Employee
Employee

Hi @hemingt 

You may create measures like below:

Count = 
CALCULATE (
   DISTINCTCOUNT ( Sheet2[Key] ),
    FILTER (
        GENERATE ( Sheet1, Sheet2 ),
        Sheet1[Week] >= Sheet2[Create_Week]
            && Sheet1[Week] <= Sheet2[Close_Week]
    )
)
cumulative_count =
IF (
    NOT ( ISBLANK ( [Count] ) ),
    CALCULATE (
        [Count],
        FILTER ( ALL ( Sheet1 ), Sheet1[Week] <= MAX ( Sheet1[Week] ) )
    )
)

Regards,

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

Thank you @v-cherch-msft 

by the way, do you know how to show data in the table according to the measure?

Hi @hemingt 

I cannot understand it.Do you want to get a calculated column?

Regards,

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

360-15264921.jpg

 

Hi @v-cherch-msft , take the above chart as example, 'In Minor', 'In Major' ... are measures.

What I want is,

When I click 'In Minor' part on the chart at certain week, then in the right table, the data only show the Serverity is Minor for the certain week.

is it clear now?

 

one comment, the right table shows the source data, and the measures also were created based on these data.

Hi @hemingt 

I would suggest you create a new thread on forum so that more community members can see it and provide advice. Please remember to post dummy data and desired result.

Regards,

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

thank you, I will create new thread

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.