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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
gredsq456
New Member

DAX selected value on slicer cannot use in calculation

Hello,

My dynamically selected_splicer value is not filtering my postgres data table rows correctly.

 

I can singly select my selected_text in the splicer table and create a measure as

Select_Slicer = values('public security'[ticker])

I can display the selected_text in a card just so I coud make sure the slicer would work.

 

My data does not show up in the chart from my filtered postgres table because of the [Select Slicer]

Stock Prices = CALCULATE( AVERAGE('public daily_price'[adj_close_price]), filter('public security'[ticker], 'public security'[ticker] = [Select_Slicer]))

 

I can get my data to show when I statically filter my Stock prices as to "F" for example. However I would like to do this with my dynamically with my slicer.

Stock Prices = CALCULATE( AVERAGE('public daily_price'[adj_close_price]), 'public security'[ticker] = "F")

 

The selected value and filtered value is a text so I don't think it is a datatype issue.

2 REPLIES 2
Fowmy
Super User
Super User

@gredsq456 

Your code looks fine, can you check the relationship between the two tables?

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Untitled.png

 

Here are my two tables. This is a "natural" relantionship from postgres. 

- security (which I use to select a the "ticker" (id AND ticker are unique and linked)

- daily_price (adj_close_price). ticker_id (is many). The daily_price table is by row unique : 

the (ticker, price_date, adj_close_price)

 

The only thing I could suspect is if I directly select the "id" instead of the "ticker" with is one for one in the security table as to pull my data.

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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