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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
tayyabvohra
New Member

How to get the range of values from the slicer after the current selection in the slicer

I have a slicer in power bi , in which I am trying to get the all the slicer values which are after the current selection in the slicer, I am trying for a while and its not working , I have also tried to create the calculated table and its still not working for me , this is the measure which I am trying to create to get all the values after the current selection

 

RangeAfterSelection = 
VAR SelectedQuarter = SELECTEDVALUE(Query1[from_quarter])
RETURN
    CALCULATETABLE(
        DISTINCT(Query1[from_quarter]),
        FILTER(
            ALL(Query1),
            Query1[from_quarter] > SelectedQuarter &&
            RIGHT(Query1[from_quarter], 4) <= "2022"
        )
    )

 



So when I try to put this measure in the table , it gives me an error of

a table of multiple values was supplied where a single value was expected


I have values in the slicer text format like this from_quarter
Data is like this


oGNK5.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @tayyabvohra 

When trying to use this measure in a visual or table, Power BI needs a single value, not a table, so you get an error.
You may want to create a calculated table or include the new column you're trying to create instead of a measure.

RangeAfterSelectionTable = 
VAR SelectedQuarter = SELECTEDVALUE(Query1[from_quarter])
RETURN
    FILTER(
        ALL(Query1),
        Query1[from_quarter] > SelectedQuarter &&
        RIGHT(Query1[from_quarter], 4) <= "2022"
    )

 

How to Get Your Question Answered Quickly 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data)

Best Regards

Yongkang Hua

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi, @tayyabvohra 

When trying to use this measure in a visual or table, Power BI needs a single value, not a table, so you get an error.
You may want to create a calculated table or include the new column you're trying to create instead of a measure.

RangeAfterSelectionTable = 
VAR SelectedQuarter = SELECTEDVALUE(Query1[from_quarter])
RETURN
    FILTER(
        ALL(Query1),
        Query1[from_quarter] > SelectedQuarter &&
        RIGHT(Query1[from_quarter], 4) <= "2022"
    )

 

How to Get Your Question Answered Quickly 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data)

Best Regards

Yongkang Hua

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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