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
Brite
Helper I
Helper I

SUM() a DISTINCTCOUNT() DAX formula for the current week

I am trying to find the sum of a distinctcount() (Scoring FR's) formula for the current week. Right now I have the Total Weekly Scoring FR's formula that finds the sum distinctcount() of scoring FR's (using distinct IDs) for the current week from today's date. Right now the total is 8 but should be 16.  What would the DAX formula be to sum Total Weekly Scoring FR's to 16 (6+7+3)? Any help is greatly appreciated 🙂

Total Weekly Scoring FR's = 
CALCULATE(
    [Scoring FR's],
    DATESINPERIOD('Calendar'[Date],[StartOfCurrentWeek],TODAY () - WEEKDAY ( TODAY (), 3 ), DAY)
)
 

  

Brite_0-1649360890182.png

 

1 ACCEPTED SOLUTION
Brite
Helper I
Helper I

I got it working with: 

# Count = SUMX( VALUES('Calendar'[Date]) ,CALCULATE(DISTINCTCOUNT( 'Pages'[Office Use Only] ) ))

View solution in original post

3 REPLIES 3
Brite
Helper I
Helper I

I got it working with: 

# Count = SUMX( VALUES('Calendar'[Date]) ,CALCULATE(DISTINCTCOUNT( 'Pages'[Office Use Only] ) ))
Ashish_Mathur
Super User
Super User

Hi,

Try this measure

Measure 1 = if(hasonevalue('calendar'[date]),[total weekly scoring fr's],sumx(values('calendar'[date]),[total weekly scoring fr's]))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. Avoid posting screenshots of your source data if possible.

Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

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.