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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.