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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
GeorgiBarov
Frequent Visitor

Help! Filter doesn't work on measure

Hello,

I'm trying to get the Average YTD per Context and Assay, but the formula that I'm using calculate the whole sum.

For example in YTD (which is measure) I want to recieve Cu per context(Actual/ Budget/etc..)

To get the result I create calculated column(Sum per day) and measure (YTD)


Sum per day =
CALCULATE(
      SUM(FactProduction[Data]),
      FILTER(
      FactProduction,
      FactProduction[Assay] = EARLIER( FactProduction[Assay]) &&
      FactProduction[Date] = EARLIER( FactProduction[Date] )
          )
)

YTD =
       CALCULATE (
            SUM ( FactProduction[Sum per day]) / COUNTA(FactProduction[Data]),
            FILTER (
            ALLEXCEPT(FactProduction, FactProduction[Assay]),
                FactProduction[Date] <= SELECTEDVALUE(FactProduction[Date])
            )
      )

The filters (Context) works with the calculated column (Sum per day), but not works with the measure (YTD)

Capture11.PNG

 Thanks 🙂

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi GeorgiBarov,

Based on the data model displayed, I make a test on my site and it turns out the result below. In calculated column (Sum per day) it can’t receive Cu per context.

 1111.png

Can I confirm with you whether there is any other information when created the calculated column, additionally, to help you effectively, would you please give a picture showing a list of result you want in YTD column?

 

Best regards,
Maggie Li

View solution in original post

1 REPLY 1
v-juanli-msft
Community Support
Community Support

Hi GeorgiBarov,

Based on the data model displayed, I make a test on my site and it turns out the result below. In calculated column (Sum per day) it can’t receive Cu per context.

 1111.png

Can I confirm with you whether there is any other information when created the calculated column, additionally, to help you effectively, would you please give a picture showing a list of result you want in YTD column?

 

Best regards,
Maggie Li

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.