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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
reh169
Helper IV
Helper IV

Creating a measure that counts where a created date is between the date parameters

I have a lot of quote data. Those quotes have customers and those customers have dates that they were created. I want to be able to count the number of quotes that were created in the time period selected by the parameters, when and only when the customer that is tied that quote has a created date that falls in the range of the parameters. For example:

If I have 5 quotes each have a different customer for the month of October 2019. Of those 5, 3 of them have customers that were created in the month of October. How do I capture that metric?

6 REPLIES 6
smpa01
Super User
Super User

@reh169can you provide some sample data and demonstrate the desired result with the logic to apply to arrive there please

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

@smpa01 So see the data below. I have the customer created date below, and I want to be able to count the number of quotes where the customer created date falls into the range of my date parameters. I am using the job start year and job start month as my date parameters as chiclets. I am not just not sure how the logic works out in dax. 

date.PNG

 

 

Quote.PNG

@reh169  can you give the source data in an excel table format

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

I found this and tried it but it is not working, did I do something wrong?

=
CALCULATE (
    DISTINCTCOUNT ( Data[Name] ),
    CALCULATETABLE ( VALUES ( Data[Name] ) ),
    CALCULATETABLE (
        VALUES ( Data[Name] ),
        USERELATIONSHIP ( Calc[Year2], Year[Year] )
    )
)
New Customer =
CALCULATE(DISTINCTCOUNT('Quotes Estimates US'[CustCode]),
CALCULATETABLE(
values('Quotes Estimates US'[Job Start Year]),
'Quotes Estimates US'[Job Start Year]= year('Quotes Estimates US'[Customer Created Date)),
CALCULATETABLE(
values('Quotes Estimates US'[job start month]),
'Quotes Estimates US'[job start month] = month('Quotes Estimates US'[customer created date)))))

@smpa01  How do I attach an excel file?

Can you please share it through Google/One Drive and clearly mention the output you expect.

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors