Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I am creating measure. unfortunately, i have tested the below measure.
vToday = TODAY()
vCalDate5 = [vToday] - 5
Emp Joined Date =
CALCULATE(DISTINCTCOUNT(EMP_TABLE[EMP_NUMBER]),FILTER(EMP_TABLE,
(EMP_TABLE[JOINED_DATE] >= [vCalDate5] && EMP_TABLE[JOINED_DATE] <= [vToday])
It will fetch only till yesterday records.
It will not fetch today rcords. what is the problem..?
Solved! Go to Solution.
@saivina2920
You can not use duplicates as a calendar table. Create a new table. And create a 1 to many relationship between the new table[date] and the sheet1[date]).
Date Table = Distinct(Sheet1[Date])
Then replace the shee1[date] with DateTable[Date]
Measure = CALCULATE(DISTINCTCOUNT((EMP_TABLE[EMP_NUMBER]),EMP_STATUS = "Active", EMP_WORK = "REGULAR",DATESINPERIOD(DateTable[Date]),TODAY(),-5,DAY)) ==> Not working syntax error.
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
@saivina2920
You can not use duplicates as a calendar table. Create a new table. And create a 1 to many relationship between the new table[date] and the sheet1[date]).
Date Table = Distinct(Sheet1[Date])
Then replace the shee1[date] with DateTable[Date]
Measure = CALCULATE(DISTINCTCOUNT((EMP_TABLE[EMP_NUMBER]),EMP_STATUS = "Active", EMP_WORK = "REGULAR",DATESINPERIOD(DateTable[Date]),TODAY(),-5,DAY)) ==> Not working syntax error.
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
Thanks.
i am using few more filter like EMP_STATUS = "Active" && EMP_WORK = "REGULAR"..
How we can apply the above filter if i use the below measure
CALCULATE(DISTINCTCOUNT((EMP_TABLE[EMP_NUMBER]),DATESINPERIOD(Sheet1[Date],TODAY(),-5,DAY))
Note : vToday is the main date function and used in many places..
CALCULATE(DISTINCTCOUNT((EMP_TABLE[EMP_NUMBER]),EMP_STATUS = "Active", EMP_WORK = "REGULAR",DATESINPERIOD(Sheet1[Date],TODAY(),-5,DAY)) ==> Not working syntax error.
Error : A date column containing duplicate dates was specified in the call to function 'DATESINPERIOD'. This is not supported.
sorry. i don't undertand your measure.
can you correct us which i given in the post..?
if i give
if i give
i think your last condition
EMP_TABLE[JOINED_DATE] >= [vCalDate5] && EMP_TABLE[JOINED_DATE] <= [vCalDate5])
is the same as
(EMP_TABLE[JOINED_DATE] = [vCalDate5]
is there something wrong with this part?
Proud to be a Super User!
Yes. Sorry. i wrongly mentioned the measure. below is the one which i used.
vToday = TODAY()
vCalDate5 = [vToday] - 5
Emp Joined Date =
CALCULATE(DISTINCTCOUNT(EMP_TABLE[EMP_NUMBER]),FILTER(EMP_TABLE,
(EMP_TABLE[JOINED_DATE] >= [vCalDate5] && EMP_TABLE[JOINED_DATE] <= [vToday])
problem is here ==> EMP_TABLE[JOINED_DATE] <= [vToday])...????
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 46 | |
| 42 | |
| 23 | |
| 18 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |