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
Anonymous
Not applicable

single select but display the range

Hi, Here is the data looks like, and the slicer is the datamonth

 

 

I want to make it realize that when the slicer select 202112, the data returns when datamonth>=202101 and datamonth <=slicer 202111,

and when the slicer is 202210, the data returns when datamonth>=202201 and datamonth <=slicer 202210,

 

 

do you have any solutions to solvecthat? Thanks.

1 REPLY 1
FreemanZ
Super User
Super User

you would need another table for the slicer, the dataset

FreemanZ_0-1670419724576.png

FreemanZ_1-1670419746987.png

 

try to create a measure with this:

 

ValueYTD =
VAR _Month = MAX(DateTable[DateMonth])
VAR _Year = LEFT(MAX(DateTable[DateMonth]),4)
RETURN
CALCULATE(
    SUM('DataTable'[Value]),
    'DataTable'[DataMonth] <= _Month
        &&LEFT('DataTable'[DataMonth],4) = _Year
)
 
i tried and it worked like this:
FreemanZ_2-1670419823320.pngFreemanZ_3-1670419840451.png

 

 

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.