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
raduchirila
Frequent Visitor

Get value from a slicer when interactions are turned off

For a complex measure, I need to retrieve the selected value from a date slicer that has the interactions turned off with my visual.

Basically, SELTECTEDVALUE would do this, but it seems like this is working only when filtering is active. It returns BLANK once I disabled filtering from Edit Interactions.

 

My measure looks like this:

Variance_Actual_Forecast_Prev_Month =
VAR currentDate=MIN(dim_Calendar[Date])
VAR selectedDate=SELECTEDVALUE(dim_ReportingCalendar[Month Year])  <= this is BLANK
VAR returnVal = IF (MIN(dim_Calendar[Date]) <= [Selected Month / Current Month],
CALCULATE([Actual_USD], FILTER(MonthlyCost, MONTH(MonthlyCost[ReportingDate])=(MONTH(selectedDate)))) -
CALCULATE([Forecast_USD], FILTER(MonthlyCost, MONTH(MonthlyCost[ReportingDate])=(MONTH(currentDate)-1)))) 
RETURN returnVal
 
dim_ReportingCalendar[Month Year]) slicer:
raduchirila_0-1637829368545.png

Is there a way to get the value selected without filtering active?

Many thanks.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @raduchirila,

I'm not so sure why you turn off the interactions. The basic interaction logic of power bi visuals is based on the filter effect from the relationship keys. If you turn off the interaction, it means the DAX expression does not recognize/receive any filter effect so its row content is equal to whole table field values.

Change how visuals interact in a report - Power BI | Microsoft Docs
For selectedvalue function itself, it works when only one value exists. Handle multiple values will return blank as result or you can set 'alternate result' option to handle and aggregate these records.

SELECTEDVALUE function - DAX | Microsoft Docs

>>Is there a way to get the value selected without filtering active?

You can create an unconnected parameter table that does not include a relationship to the fact table. For filter and interaction operation, you can use DAX expressions to create a measure filter to achieve them.

Applying a measure filter in Power BI - SQLBI

Regards,

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @raduchirila,

I'm not so sure why you turn off the interactions. The basic interaction logic of power bi visuals is based on the filter effect from the relationship keys. If you turn off the interaction, it means the DAX expression does not recognize/receive any filter effect so its row content is equal to whole table field values.

Change how visuals interact in a report - Power BI | Microsoft Docs
For selectedvalue function itself, it works when only one value exists. Handle multiple values will return blank as result or you can set 'alternate result' option to handle and aggregate these records.

SELECTEDVALUE function - DAX | Microsoft Docs

>>Is there a way to get the value selected without filtering active?

You can create an unconnected parameter table that does not include a relationship to the fact table. For filter and interaction operation, you can use DAX expressions to create a measure filter to achieve them.

Applying a measure filter in Power BI - SQLBI

Regards,

Xiaoxin Sheng

VahidDM
Super User
Super User

Hi @raduchirila 

 

Can you please add more details? maybe there is a way to find the desired value with active filter

Is it possible to post a sample data as text and expected output?

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
4. Relation between your tables

Appreciate your Kudos!!
LinkedIn:www.linkedin.com/in/vahid-dm/

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.