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

Get data from filter for measure

 
 

hi everyone, i need your help with this dynamic filter that i cant seem to find a solution for...

Picture1.png

how do i get the difference of the quantity between the 2 period that i selected from the filter? the quantity is the one in millions btw. thanks in advance! would really appreciate it 

 

 
3 REPLIES 3
stevedep
Memorable Member
Memorable Member

You are probably looking for a slightly different version:

Measure =
VAR MaxDate = MAX(ALLSELECTED ('Date'[Date]))
Var MinDate = MIN(ALLSELECTED ('Date'[Date]))
Return
CALCULATE( [your original measure], filter (all(date), date > mindate && date < maxdate))

 

 

Anonymous
Not applicable

Hi,

Try this measure!

 

Measure = 
VAR MaxDate = MAX('Date'[Date])
Var MinDate = MIN('Date'[Date])
Return
CALCULATE(
    DATEDIFF(MinDate,MaxDate,DAY),
    Products    
)

 

image.png

Anonymous
Not applicable

Actually, I think Allselected() would probably be a better filter than the table name.

 

Hope that helps you!

 

~Kim 

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.