Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Everyone! I have this requirement to create a slicer where a measure should be filtered by both start date and end date. (ex. We need to see the total tickets created and completed from Jan 1 to Jan 31 (Between Date Slicer)). Tried using USERELATIONSHIP but it can only filter one date column.
CREATED_COMPLETED = CALCULATE(DISTINCTCOUNT('RAW'[TICKETNUMBER]),USERELATIONSHIP('RAW'[DATE CREATED],'Date Table'[Date]),USERELATIONSHIP('RAW'[DATE COMPLETED],'Date Table'[Date]))
Thank you.
Solved! Go to Solution.
Hi, in this case you would need to disconnect your Date table from RAW table and create one measure for filtering your report.
You can refer to my testFile. I used this demo measure below and you can adjust it based on your real situation.
Tickets_CreatedAndCompleted =
CALCULATE(
DISTINCTCOUNT('Tickets'[TICKETNUMBER]),
FILTER(
'Tickets',
'Tickets'[DATE CREATED] >= MIN('Date Table'[Date]) &&
'Tickets'[DATE CREATED] <= MAX('Date Table'[Date]) &&
'Tickets'[DATE COMPLETED] >= MIN('Date Table'[Date]) &&
'Tickets'[DATE COMPLETED] <= MAX('Date Table'[Date])
)
)
Hope it helps:)
This works! Thanks a lot!
Hi,
I am not sure how your semantic model looks like but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
created and completed: =
VAR _t =
FILTER (
RAW,
RAW[DATE COMPLETED] >= MIN ( 'Date Table'[Date] )
&& RAW[DATE CREATED] <= MAX ( 'Date Table'[Date] )
)
RETURN
COUNTROWS ( _t )
Thank you. I appreciate your response, however, I'm not sure why but some filters are not showing accurate numbers.
Hi, in this case you would need to disconnect your Date table from RAW table and create one measure for filtering your report.
You can refer to my testFile. I used this demo measure below and you can adjust it based on your real situation.
Tickets_CreatedAndCompleted =
CALCULATE(
DISTINCTCOUNT('Tickets'[TICKETNUMBER]),
FILTER(
'Tickets',
'Tickets'[DATE CREATED] >= MIN('Date Table'[Date]) &&
'Tickets'[DATE CREATED] <= MAX('Date Table'[Date]) &&
'Tickets'[DATE COMPLETED] >= MIN('Date Table'[Date]) &&
'Tickets'[DATE COMPLETED] <= MAX('Date Table'[Date])
)
)
Hope it helps:)
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
12 | |
10 | |
10 | |
6 |