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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Matt_Mohawk
Helper II
Helper II

Distinct Job Count based on Start Date

Hi,

 

I need to get a distinct count of jobs based on Entered Date. This is the day that it was entered into our systems. For some reason, the data that shows is only working based on Start Date for each revision to the Job. January should have a distinct count of 22 but I am getting way more than that. I can send a pbix file if needed.

 

Matt_Mohawk_0-1671549525371.png

 

Matt_Mohawk_1-1671549901290.png

 

@amitchandak 

4 REPLIES 4
Mikelytics
Resident Rockstar
Resident Rockstar

Hi @Matt_Mohawk 

 

Then I am pretty sure its because of your data model. Do you have an relation between the ENtry column and the date column of your data table? If not then this is the issue. You have to create the connection. As a result it should look like this

Mikelytics_0-1671551967129.png

the highlighted line is a inactive relationship.

 

Now you have to add in the emasure the USERELATIONSHIP function

Number of jobs =
VAR __MinDate = MIN(DimDate[Date])
RETURN
CALCULATE(
   DISTINCTCOUNT(FactTable[JobNumberColumn]),
   DimDate[Date] >= __MinDate,
   USERELATIONSHIP(DimDate[Date],FactTable[EntryColumn])
)

 

Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Appreciate your thumbs up!
@ me in replies or I'll lose your thread.

 

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

I currently have a relationship built for every table that I currently use. I use the Date Out field for that table because I have other data that I have to display other than what I had provided you. See image below to see the Relationship area.

 

Matt_Mohawk_0-1671553378279.png

 

Mikelytics
Resident Rockstar
Resident Rockstar

HI @Matt_Mohawk 

 

Please try the following

Number of jobs =
VAR __MinDate = MIN(DimDate[Date])
RETURN
CALCULATE(
   DISTINCTCOUNT(FactTable[JobNumberColumn]),
   DimDate[Date] >= __MinDate
)
   

 

Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Appreciate your thumbs up!
@ me in replies or I'll lose your thread.

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

@Mikelytics ,

 

Thank you for responding so quickly. I am still getting the same number. I have pasted an image below of the formula I created. Is it set up correctly?

 

Matt_Mohawk_0-1671550680733.png

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.