Forum Discussion
dax date parameter
- 4 years ago
Hi fab196 ,
According to your description, a separate date column is created without creating a relationship between the tables. The measure created is used to count the number of locs under the selected date.
I did a test reference as follows:
M = VAR sel_data = SELECTEDVALUE ( 'Calendar'[Date] ) RETURN CALCULATE ( COUNTROWS ( 'Table' ), 'Table'[ack date] = sel_data )
If the problem is still not resolved, please provide more information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi fab196 ,
According to your description, a separate date column is created without creating a relationship between the tables. The measure created is used to count the number of locs under the selected date.
I did a test reference as follows:
M =
VAR sel_data =
SELECTEDVALUE ( 'Calendar'[Date] )
RETURN
CALCULATE ( COUNTROWS ( 'Table' ), 'Table'[ack date] = sel_data )
If the problem is still not resolved, please provide more information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hi ,
it is possible to generate code like sql in dax
here is my sql code
select sum(ship),sum(ack) from (select count(id) as ship,0 as ack from tramsaction where ship date >=date and ship date<=date
union
select 0 as ship , count(id) as ack from tramsaction where ack date>=cast( datefromparts(year(@strdate),month(@strdate),1) as datetime) and ack date<=CONVERT(date, @strdate, 120) )
group by location)a
please help