Forum Discussion
Anonymous
3 years agoNot applicable
Using a single slider for four dates column
Hi All, I have fours Dates columns in table Like AFromDate, BTodate, CFromDate,DTodate The issue is i want to use single date to selecte all the period within these four dates. I have c...
- Anonymous3 years ago
Hi Anonymous ,
It is by design.
You are using SELECTEDVALUE ( 'TableA'[TsFromDate] ) and SELECTEDVALUE ( 'TableA'[TsToDate] ) in the formula.
Remember that SELECTEDVALUE function rely on context, you will need the columns in visual.
Best Regards,
Jay
lukiz84
3 years agoMemorable Member
Can you show some sample rows where it doesn't work?
- Anonymous3 years agoNot applicable
Thanks Lukiz for response.
Now that issue has been resolved.
Can you help me to resolve below DAX.
TS Count =var flag =IF (SELECTEDVALUE ( 'TableA'[TsFromDate] ) <= MAX ( DimDate[FullDateAlternateKey] )&& SELECTEDVALUE ( 'TableA'[TsToDate] ) >= MIN ( DimDate[FullDateAlternateKey] ),1,0)var TsCount =IF (flag = 1, CALCULATE(COUNT('TableA'[TS_ID])) + 0,0)return TsCountRight now, Current selection in slicer is september, 2022.In my grid, when i put both columns so above Dax measure works fine and calculate count as required as shown below.But when i remove date columns in grid so it does not work and count is 0.
I dont need to show dates in Grid as per requirment.
Any suggestion would be highly appreciated.