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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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