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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Pat8
Frequent Visitor

Change column value based on slicer

I have a table with months and showing amounts and a measure comparing last month and this month's amount:

MonthThis MonthNot This MonthAmountMeasure: Amount - Lastmonth amount
1-JanTRUEFALSE5000
1-FebFALSETRUE700200
1-MarFALSETRUE400-300


When I select the month for the slicer, I would like to have a measuer or a column to show the following:

if the selected month is xx month, the value should be the [This Month]. If not, the value of [Not This Month].

Example: selected month is February via slicer, the table should show this (new measure picks up not this month from jan and this month value from feb):

MonthAmountMeasure: Amount - Lastmonth amountNew Measure
1-Jan500 FALSE
1-Feb700200FALSE
1-Mar400-300TRUE






1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @Pat8 ,

 

You need to create a disconnected table as a slicer,

slicer = DISTINCT('Table'[Month])


then create the following measure:

Measure = IF(MAX('Table'[Month])>SELECTEDVALUE(slicer[Month]),TRUE(),FALSE())

Vlianlmsft_0-1634190849005.png

 


Best Regards,
Liang
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

3 REPLIES 3
V-lianl-msft
Community Support
Community Support

Hi @Pat8 ,

 

You need to create a disconnected table as a slicer,

slicer = DISTINCT('Table'[Month])


then create the following measure:

Measure = IF(MAX('Table'[Month])>SELECTEDVALUE(slicer[Month]),TRUE(),FALSE())

Vlianlmsft_0-1634190849005.png

 


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

vivran22
Community Champion
Community Champion

Hello @Pat8 ,

 

You may try this:

 

vivran22_0-1634025433803.png

 

Selected Measure =
VAR _PrevMonth = PREVIOUSMONTH('Table'[Month])
VAR _Calc =
SELECTEDVALUE('Table'[Amount]) - CALCULATE(SUM('Table'[Amount]),PREVIOUSMONTH('Table'[Month]))
VAR _Check = IF(NOT ISBLANK(_PrevMonth),_Calc)
RETURN
_Check
 
Cheers!
Vivek

If it helps, please mark it as a solution
Kudos would be a cherry on the top 🙂 (Hit the thumbs up button!)
If it doesn't, then please share a sample data along with the expected results (preferably an excel file and not an image)


https://www.vivran.in/

Connect on LinkedIn
Pat8
Frequent Visitor

Thanks for the reply! What I need is the TRUE/FALSE based on the selected month on the slicer.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors