Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
jessecrosswhite
New 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 I'm using the below DAX as a calculated to feed a card

 

Column = CONCATENATEX(values(warehouseQuery[in_whs_key]),warehouseQuery[in_whs_key],", ")
 
I've also tried Allselected but I think i'm missing something fundemental about sliced sleected values
because in the end I want something like the below to tell me if the warehouse and date is selected but it
always temms me they are all selected
 
row selected =
  var selectedDates = ALLSELECTED(datesQuery[Scheduled_Ship_date])
  var selectedWarehouses = ALLSELECTED(warehouseQuery[in_whs_key])
  return
  CALCULATE(
COUNTX(
    filter(listOfOrdersQuery, listOfOrdersQuery[in_whs_key] in selectedWarehouses
            && listOfOrdersQuery[Scheduled_Ship_date] in selectedDates )
    ,listOfOrdersQuery[order transfer]) 
)

 

 

1 ACCEPTED SOLUTION
jessecrosswhite
New 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 

 

Column1Column2
A1
B10
C100

 

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

View solution in original post

3 REPLIES 3
jessecrosswhite
New 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 

 

Column1Column2
A1
B10
C100

 

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
jessecrosswhite
New Member

below is some sample data. the slicers would be on the 1st 2 tables and I want them to filter the 3rd. from the 3rd table I would take the 'order transfer' data and filter the data on the final result table

 

Scheduled_Ship_date
20.03.13
20.03.14
20.03.15

 

in_whs_key
014
050
122
128
144
146
148

 

order transferin_whs_keyScheduled_Ship_date
14506011420.03.14
14506015020.03.13
145062114420.03.13
145590112820.03.13
145590114620.03.15
145659112220.03.13
145659114820.03.13
145659312820.03.13
145659514620.03.15
Greg_Deckler
Community Champion
Community Champion

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.