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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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