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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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