Forum Discussion
Slicer after Measure
- 8 years ago
Hi Anonymous,
For your scenario, I'm afraid that the cause is the ALL function in your measure.
If you use the All function, it returns all the rows in a table, or all the values in a column, ignoring any filters that might have been applied. This function is useful for clearing filters and creating calculations on all the rows in a table.
You could try this:
Count of Active Employee = VAR endOfPeriod = MAX ( 'Date'[Date] ) VAR startOfPeriod = MIN ( 'Date'[Date] ) RETURN CALCULATE ( COUNTROWS ( tabExterne ); FILTER ( tabExterne; ( tabExterne[Start] <= endOfPeriod && tabExterne[Ende] >= startOfPeriod ) ) )If you still need help, please share some data sample and your desired output.
Best Regards,
Cherry
Hi Anonymous,
For your scenario, I'm afraid that the cause is the ALL function in your measure.
If you use the All function, it returns all the rows in a table, or all the values in a column, ignoring any filters that might have been applied. This function is useful for clearing filters and creating calculations on all the rows in a table.
You could try this:
Count of Active Employee =
VAR endOfPeriod =
MAX ( 'Date'[Date] )
VAR startOfPeriod =
MIN ( 'Date'[Date] )
RETURN
CALCULATE (
COUNTROWS ( tabExterne );
FILTER (
tabExterne;
( tabExterne[Start] <= endOfPeriod
&& tabExterne[Ende] >= startOfPeriod )
)
)
If you still need help, please share some data sample and your desired output.
Best Regards,
Cherry
Hi v-piga-msft,
Thank you, i will check if it working, but after a quick test I would say yes.