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
matrix_user
Helper III
Helper III

Date slicer with percent reader.

Hi Power Bi users,

 

What woudl be the best way to buld a card visual that would read out the percentage of the date slicer. 

The challenge would be that scrolling from either end reads the percentage: If you mover the left slicer dot to the right a quarter of the way, you get 75% reading and if you move the right slicer dot, a quarter to the right ,you get a 50% reading for the whole date range.

 

matrix_user_4-1648258656977.png

 

Thank you people.

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

hi @matrix_user 

you can try

Selected Date Range % =
VAR FirstDateEver =
    CALCULATE ( MIN ( Sales[Order Date] ), REMOVEFILTERS () )
VAR LastDateEver =
    CALCULATE ( MAX ( Sales[Order Date] ), REMOVEFILTERS () )
VAR FirstDateInFiltet =
    MIN ( Sales[Order Date] )
VAR LastDateInFiltet =
    MAX ( Sales[Order Date] )
RETURN
    DIVIDE (
        DATEDIFF ( FirstDateInFiltet, LastDateInFiltet, DAY ),
        DATEDIFF ( FirstDateEver, LastDateEver, DAY ),
        0
    )

But you have to know that if you have dates without sale then the calculated percentage might not be accurate for some selections.  Best is to have a date table. 

View solution in original post

2 REPLIES 2
matrix_user
Helper III
Helper III

Thanks Tamerj1

tamerj1
Super User
Super User

hi @matrix_user 

you can try

Selected Date Range % =
VAR FirstDateEver =
    CALCULATE ( MIN ( Sales[Order Date] ), REMOVEFILTERS () )
VAR LastDateEver =
    CALCULATE ( MAX ( Sales[Order Date] ), REMOVEFILTERS () )
VAR FirstDateInFiltet =
    MIN ( Sales[Order Date] )
VAR LastDateInFiltet =
    MAX ( Sales[Order Date] )
RETURN
    DIVIDE (
        DATEDIFF ( FirstDateInFiltet, LastDateInFiltet, DAY ),
        DATEDIFF ( FirstDateEver, LastDateEver, DAY ),
        0
    )

But you have to know that if you have dates without sale then the calculated percentage might not be accurate for some selections.  Best is to have a date table. 

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.