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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
DanduMani104
Helper III
Helper III

distinct Count of tour request numbers

hello team,
I have Append-QMR table in power bi. i have TOUR_REQUEST_NO and WEEK_NO and INQUIRY_DATE_KEY and TERMINATION_YEAR columns in that table. the INQUIRY_DATE_KEY is related with DATE_KEY  column in M_INQ_DATE_D date table.In this table I have full date. I want to count the distinctcount of TOUR_REQUEST_NO created in in this week by taking refence INQUIRY_DATE_KEY .

Im getting more trouble with the dax function
i have used 
DistinctCount_ThisWeek =
CALCULATE(
    DISTINCTCOUNT('Append-QMR'[TOUR_REQUEST_NO]),
    FILTER(
        'Append-QMR',
        'Append-QMR'[INQUIRY_DATE_KEY] >= FIRSTDATE(M_INQ_DATE_D[FULL_DATE].[Date]) &&
        'Append-QMR'[INQUIRY_DATE_KEY] <= LASTDATE(M_INQ_DATE_D[FULL_DATE].[Date])
    )
)fucction
 
 
7 REPLIES 7
nareshr89
Helper II
Helper II

You dont need weekcolumn in specific as this information is picked up based on the WEEKNUM DAX function. Just the date column is required. 

the error is 

DanduMani104_0-1708012325608.png

 

Try this DistinctCount_ThisWeek =
CALCULATE(
DISTINCTCOUNT('Append-QMR'[TOUR_REQUEST_NO]),WEEKNUM('Append-QMR'[INQUIRY_DATE_KEY].[Date])=WEEKNUM(NOW())

           )

 If it still doesn't work share a sample PBIX file.

DanduMani104_0-1708064821457.png

 

This is my model

nareshr89
Helper II
Helper II

Try this DistinctCount_ThisWeek =
CALCULATE(
DISTINCTCOUNT('Append-QMR'[TOUR_REQUEST_NO]),
FILTER(

    WEEKNUM(M_INQ_DATE_D[FULL_DATE].[Date])=WEEKNUM(NOW())

           )

 )

I tried this..one but in Date Table ..We do not have week column right?

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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