Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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])...????
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |