Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
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])...????
User | Count |
---|---|
83 | |
77 | |
71 | |
69 | |
54 |
User | Count |
---|---|
105 | |
100 | |
91 | |
79 | |
68 |