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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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.