Forum Discussion
jessecrosswhite
6 years agoNew Member
need help getting selected slicer values
I have a simple query with one column that I want to use to in DAX. I have the column in a slicer to select a value but no mater what I select I always get all the rows in my DAX caculation. to test ...
- 6 years ago
Basicly DAX can't work with test fields like that. It can with numbers but not with text. For instance if you build a table like
Column1 Column2 A 1 B 10 C 100 then a formula like
Column3 = CALCULATE( sum('Table'[Column2]),ALLSELECTED('Table'[Column1],'Table'[Column1]))will indicate which values have been selected butColumn4 = Calculate(CONCATENATEX(ALLSELECTED('Table'[Column1]),'Table'[Column1],", "))will always return A, B, CIt seemed like a way to get around the many-to-many restrictions with out having to build a new view
jessecrosswhite
6 years agoNew Member
Basicly DAX can't work with test fields like that. It can with numbers but not with text. For instance if you build a table like
| Column1 | Column2 |
| A | 1 |
| B | 10 |
| C | 100 |
then a formula like
Column3 = CALCULATE( sum('Table'[Column2]),ALLSELECTED('Table'[Column1],'Table'[Column1]))
will indicate which values have been selected but
Column4 = Calculate(CONCATENATEX(ALLSELECTED('Table'[Column1]),'Table'[Column1],", "))
will always return A, B, C
It seemed like a way to get around the many-to-many restrictions with out having to build a new view