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 September 15. Request your voucher.

Reply
munder
Frequent Visitor

Diferent values with the same filter

HI guys

 

i need help with a table that have 2 different dates is look like this

munder_0-1640716028507.png

and the sell amount is with the filter form the column redem date, and beside of that i need calculate the seel from past (sells with a date from column (buy date) that made before the dates in the filter (redem date) in this case row 2 and 3, and the future sale but in this case with sell made in the same period but filtering the sell column and looking redem date in this case row 6. i duplicated the table and use a calender between both so i can filter with both columns at the same time but i cant create a measure to calculate this 2 amounts 

1 ACCEPTED SOLUTION

Hi @munder, here's a link to a .pbix file: link 

 

Does that help?

View solution in original post

4 REPLIES 4
SteveHailey
Solution Specialist
Solution Specialist

Give these two measures a try:

 

less sell =
VAR FromDate = MIN( 'Calendar'[Date] )
VAR ToDate = MAX( 'Calendar'[Date] )
VAR Result =
CALCULATE(
SUM( 'Table'[sell] ),
FILTER(
'Table',
'Table'[buy date] < FromDate
&& 'Table'[redem date] >= FromDate
&& 'Table'[redem date] <= ToDate
)
)
RETURN
Result
 
and:
 
future sell =
VAR FromDate = MIN( 'Calendar'[Date] )
VAR ToDate = MAX( 'Calendar'[Date] )
VAR Result =
CALCULATE(
SUM( 'Table'[sell] ),
FILTER(
'Table',
'Table'[buy date] >= FromDate && 'Table'[buy date] <= ToDate
&& 'Table'[redem date] > ToDate
)
)
RETURN
Result
 
-Steve

HI Steve @SteveHailey  thanks for the answer, i did both measure but the result is blank, i change some part off the measure but the same result...., you have any other idea, i will appreciate.

 

thanks and reagrds

Hi @munder, here's a link to a .pbix file: link 

 

Does that help?

Yes @SteveHailey  is work i notice my mistake

 

thanks for the help

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.