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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

how to get the count in a week format

Hi,

 

I column for Week Start date with the below dax formula:

WeekStartDate = 'ECM Data'[Date Created] - WEEKDAY('ECM Data'[Date Created], 2) + 1
 
but then we i get the total count of tickets, it is not getting the count per week. below is the result i am getting:
 
gheecalipes25_0-1666200910700.png

what are the additional measures/dax formulas needed for  me to get the total count per week.

 

Thanks.

 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

You can create a measure as below to get the count of tickets per week:

Count of tickets =
VAR _tab =
    SUMMARIZE (
        'ECM Data',
        'ECM Data'[WeekStartDate],
        "@count",
            CALCULATE (
                DISTINCTCOUNT ( 'ECM Data'[Ticket Number] ),
                FILTER (
                    'ECM Data',
                    'ECM Data'[WeekStartDate] = EARLIER ( 'ECM Data'[WeekStartDate] )
                )
            )
    )
RETURN
    SUMX ( _tab, [@count] )

yingyinr_0-1666232365225.png

Or you don't need to create any measure, just create a table visual with the field [WeekStartDate] and put the field [Ticket] with the aggregation function: Count(Distinct) just as below screenshot:

yingyinr_1-1666232458763.png

 

You can find all above information in the attachment.

Best Regards

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

the formula worked. its good now. thank you

Anonymous
Not applicable

i am still getting the same result. i am not sure if the weekstartdate formula is the problem. Here's how icreated the weekstart date column:

 

WeekStartDate = 'ECM Data'[Date Created] - WEEKDAY('ECM Data'[Date Created], 2) + 1
 
Anonymous
Not applicable

Hi @Anonymous ,

You can create a measure as below to get the count of tickets per week:

Count of tickets =
VAR _tab =
    SUMMARIZE (
        'ECM Data',
        'ECM Data'[WeekStartDate],
        "@count",
            CALCULATE (
                DISTINCTCOUNT ( 'ECM Data'[Ticket Number] ),
                FILTER (
                    'ECM Data',
                    'ECM Data'[WeekStartDate] = EARLIER ( 'ECM Data'[WeekStartDate] )
                )
            )
    )
RETURN
    SUMX ( _tab, [@count] )

yingyinr_0-1666232365225.png

Or you don't need to create any measure, just create a table visual with the field [WeekStartDate] and put the field [Ticket] with the aggregation function: Count(Distinct) just as below screenshot:

yingyinr_1-1666232458763.png

 

You can find all above information in the attachment.

Best Regards

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors