Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hello,
I need to apply the filter (from filter pane) to the allselected function. I am aware that using values function gives the count but I
need the function to return all the rows in a table, or all the values in a column, based on the filter selection for other calculations/measures.
Below is the sample dataset:
YearClientProject
2020 | A | 1 |
2021 | A | 2 |
2022 | A | 3 |
2019 | B | 1 |
2018 | B | 2 |
2020 | B | 3 |
2021 | B | 4 |
is it possible to get return all the rows that are matching only the selected years in slicer (respecting the filters applied).
Thanks,
AnthonyJoseph
Solved! Go to Solution.
Hi @AnthonyJoseph,
I'd like to suggest you use Dax expression to extract the selection and store in variable. Then you can use this as condition in formula calculations:
formula =
VAR selection =
VALUES ( Table2[Column2] )
RETURN
CALCULATE (
COUNTROWS ( ALLSELECTED ( Table1[Column] ) ),
FILTER ( ALLSELECTED ( Table1 ), [Column2] IN selection )
)
Regards,
Xiaoxin Sheng
Hi @AnthonyJoseph,
I'd like to suggest you use Dax expression to extract the selection and store in variable. Then you can use this as condition in formula calculations:
formula =
VAR selection =
VALUES ( Table2[Column2] )
RETURN
CALCULATE (
COUNTROWS ( ALLSELECTED ( Table1[Column] ) ),
FILTER ( ALLSELECTED ( Table1 ), [Column2] IN selection )
)
Regards,
Xiaoxin Sheng
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
24 | |
19 | |
14 | |
10 | |
7 |