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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Garbo62
Helper II
Helper II

Issue with returning a value from a Numeric Range slicer in a second measure

I’m having a issue with returning a value from a Numeric Range slicer

Initally it is returning the correct value , but when used later on it is returning the default value not the selected value

Garbo62_0-1688152913715.png

 

 

Garbo62_1-1688152913716.png

 

But when I use in another measure as a calculation it retunes the default value of the slicer, which in this case is 35,

 

 

The initial Measure is

Efficiency - Seminars Value = SELECTEDVALUE('Efficiency - Seminars'[Efficiency - Seminars], 35)

Returns 70, correct as the slicer is set to 70

I tried a using it in a basic measure in the table I wish to do the calculation such as (simplified for this message)

Efficiency = 'Efficiency - Seminars'[Efficiency - Seminars Value]

But returns 35, it should be 70

 

What have I done wrong

 

(I have 5 slicers and some screen shots don’t match)

Garbo62_0-1688153313422.png

 

Final equation is,  ut it jusk keep returning 35

 

Efficiency = IF([Space Type] = "Studios", 'Efficiency - Studio'[Efficiency - Studio]/100,

    IF([Space Type] = "Lectures", 'Efficiency - Lectures'[Efficiency - Lectures Values]/100,

    IF([Space Type] = "Seminars", 'Efficiency - Seminars'[Efficiency - Seminars Value]/100,

        IF([Space Type] = "Technical Workshops", 'Efficiency - Technical'[Efficiency - Technical Value]/100,

               IF([Space Type] = "Tutorial", 'Efficiency - Tutorial'[Efficiency - Tutorial Value]/100,  

    0)))))

 

To be used in  the following evaluatopm

 

Efficient Hours Per Week = IF(ISBLANK('SpaceData (Excel)'[Capacity]),0,('SpaceData (Excel)'[Capacity] * 40)* 'SpaceData (Excel)'[Efficiency]

 

 

 

 

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

It looks like you're trying to use it in a calculated column, but that won't work. Columns are only calculated during load or refresh, so they don't pay any attention to slicers or filters in a report.

If you want something to respond dynamically to slicers you will need to use a measure rather than a calculated column.

View solution in original post

1 REPLY 1
johnt75
Super User
Super User

It looks like you're trying to use it in a calculated column, but that won't work. Columns are only calculated during load or refresh, so they don't pay any attention to slicers or filters in a report.

If you want something to respond dynamically to slicers you will need to use a measure rather than a calculated column.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

Users online (1,622)