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.
Hi,
I m using below measures to calculate Total count between 320 and 365 days.Its showing blank value..Is this measure is correct ?
Date'[Date] is calendar table join with Table [CREATED_ON]) .
Age= CALCULATE(COUNT(Table [CREATED_ON]),DATESBETWEEN(Table[CREATED_ON],LASTDATE(DATEADD('Date'[Date],-320,DAY)),LASTDATE(DATEADD('Date'[Date],-365,DAY)) ) )
Thanks
Solved! Go to Solution.
Its working . For older than 1 year .
it should be below measure right?
Age=
var _dt =minx('Date','Date'[Date])
var _min =_dt+365
return
CALCULATE(COUNT(Table [CREATED_ON]),Table [CREATED_ON]>=_min)
@Anonymous , try like
Age=
var _dt =minx('Date','Date'[Date])
var _min =_dt-365
var _max = _dt -320
return
CALCULATE(COUNT(Table [CREATED_ON]),Table [CREATED_ON]>=_min,Table [CREATED_ON]<=_max)
Its working . For older than 1 year .
it should be below measure right?
Age=
var _dt =minx('Date','Date'[Date])
var _min =_dt+365
return
CALCULATE(COUNT(Table [CREATED_ON]),Table [CREATED_ON]>=_min)
Hi @Anonymous ,
It's the same principle if the previous measure worked.
Glad to hear the issue is solved. You can accept your reply as solution, that way, other community members could easily find the answer when they get same issues.
Best Regards,
Yingjie Li
@Anonymous
try
Age= CALCULATE(
COUNT(Table[CREATED_ON]),
DATESBETWEEN(Table[CREATED_ON],DATEADD(LASTDATE('Date'[Date]),-320,DAY),DATEADD(LASTDATE('Date'[Date]),-365,DAY) ) )
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 |