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
Anonymous
Not applicable

Caculating value according to a dynamic value

Hello Masters

 

I failed in sum the value according to a dymanic value as below ,  it returned the total instead from the filter ,  

can everyone tell the correct farmula

 

Failure 1

Measure1 = FIRSTDATE ( Table{date})

Measure 2 = CACULATE(SUM(Table{value},FILTER(Table,Table{date} = {Measure 1} )

 

Failure 2 

Measure 1 = MIN (Table {week})

Measure 2 = CACULATE(SUM(Table{value},FILTER(Table,Table{week} = {Measure 1} )

 

the reason I created Measure1 instead of caculating FIRSTDATE or MIN directly in CACULATE is  in my data items have different starting date with record  , I suppose they will not in the same timing when I am looking at result  on item level .

 

I want return with  0 , if the item does not have a record on the FIRSTDATE within the chosen periods  of group items 

 

thanks 

 

eric

1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

@Anonymous

 

Try this one

 

Measure 1 = MIN (Table [week])

Measure 2 =
VAR mydate = [Measure1]
RETURN
    CALCULATE ( SUM ( Table[value] ), FILTER ( Table, Table[date] = mydate ) )

View solution in original post

2 REPLIES 2
Zubair_Muhammad
Community Champion
Community Champion

@Anonymous

 

Try this one

 

Measure 1 = MIN (Table [week])

Measure 2 =
VAR mydate = [Measure1]
RETURN
    CALCULATE ( SUM ( Table[value] ), FILTER ( Table, Table[date] = mydate ) )
Anonymous
Not applicable

@Zubair_Muhammad

It works amazing , thanks Zubair

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.

Top Solution Authors