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

Creating a Slicer to a Measure

Hi Experts!!

 

I'm a newbie in using DAX, but I need to create a slicer that will filter the values of a Measure. Here is my measure:

Past Due = If([Outstanding Balance] > [Amortization Balance] && [Due Date] < MAX('Calendar'[Date]), "Past Due", "Current")

 

Now when in the report I need to have a slicer to filter those Past Due and Current accounts.

 

Thanks for your help!

5 REPLIES 5
v-juanli-msft
Community Support
Community Support

Hi @Peejz_Jalmasco 

Create a date table without relationship with your tables.

date = CALENDARAUTO()

Capture15.JPG

 

Then add date column from this date table to a slicer,

Create measures

Capture16.JPG

Measure =
VAR maxseletced =
    CALCULATE ( MAX ( 'date'[Date] ), ALLSELECTED ( 'date' ) )
RETURN
    IF (
        [Outstanding Balance] > [Amortization Balance]
            && MAX ( Sheet9[date] ) < maxseletced,
        "Past Due",
        "Current"
    )

or 

Measure 2 =
VAR maxseletced =
    CALCULATE ( MAX ( 'date'[Date] ), ALLSELECTED ( 'date' ) )
RETURN
    IF (
        [Outstanding Balance] > [Amortization Balance],
        IF ( MAX ( Sheet9[date] ) < maxseletced, "Past Due", "Current" )
    )
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

@v-juanli-msft 

Hi Maggie,

 

What I need to slice is the Measure (based on your sample) where the table will only show current or past-due whichever I choose in the slicer.

 

Thanks!

amitchandak
Super User
Super User

New column like this should work

 

Past Due = 
var _v1 =MAX('Calendar'[Date])

return If([Outstanding Balance] > [Amortization Balance] && [Due Date] <_v1 , "Past Due", "Current")

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak 

It is not possible for me to use a custom column since the tagging must be done through the measure.

Ashish_Mathur
Super User
Super User

Hi,

I am not sure of how much i can help I'd like to try.  Share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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