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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
srlabhe
Helper V
Helper V

Error while using the Measure in Table Visual as filter

Hi Team,

I am using a mesure ToSHow below to filter a Table Visual so that it check latest date unitil the date Selected in Slicer and the filter that record for respective ID. 

ToShow =
if(
CALCULATE(
    MAX(Table[AS_OF_DATE]), // Returns the latest As Of Date
    FILTER(
        ALL(Table),
        Table[ID] = SELECTEDVALUE(Table[ID]) && // Filter for the current ID 
        Table[AS_OF_DATE] <= [MaxAsOfDateSelected] // Filter for dates before the selected slicer date
    )
   
)=SELECTEDVALUE(Table[AS_OF_DATE]),1,0)
When I try to apply this above meausre as filter in Table Visual which has almost 25  fields which shows detailed data. It thorw below error 
srlabhe_0-1760713543799.png

Surprising when I created a column as ToShowVar=[ToShow] and use this column as filter, it doesnt wthrow an error but data gets filters more than expected.

 

Any inputs here please 

6 REPLIES 6
v-nmadadi-msft
Community Support
Community Support

Hi  @srlabhe ,
Thanks for reaching out to the Microsoft fabric community forum.

You can check where the issue lies using Performance Analyzer in Power BI Desktop. Go to the View tab -> enable Performance Analyzer -> click Start Recording, then interact with your report. It will show how much time each visual and DAX query takes.

Based on the result try to make required corrections to the DAX measures.


I hope this information helps. Please do let us know if you have any further queries.
Thank you

danextian
Super User
Super User

Hi @srlabhe 

 

What does MaxAsOfDateSelected do? What is the formula? 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

MaxAsOfDateSelected = maxx(ALLSELECTED(CalendarTable),CalendarTable[Date])
and the CalendarTable is a standlaone table.
Ashish_Mathur
Super User
Super User

Hi,

Share some data to work with, explain the question and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ritaf1983
Super User
Super User

Hו @srlabhe 

The “Resources Exceeded” message means the query ran out of available memory or processing threads. This usually happens when a measure is evaluated over a very large fact table with many detail fields. In your case, the DAX formula references ALL(Table) inside CALCULATE, which forces the engine to scan the full dataset for every ID.

This type of operation is heavy because it runs row by row on a wide fact table instead of leveraging small dimension tables. When you created a calculated column instead of a measure, the engine could precompute the result once per row, which explains why it didn’t crash but still applied the logic differently.

To handle this better, review your data model.
Use a proper star schema:

Keep your detailed transactions in a single fact table.

Connect smaller dimension tables (like Date, ID, or Category).

Use a calendar table for time-based logic and slicers.
This structure lets Power BI filter efficiently without recalculating over the entire fact.

If you still need to use this logic as a filter, reduce the number of columns in the visual or pre-aggregate data to smaller sets.
More information about star schema is here:
https://learn.microsoft.com/en-us/power-bi/guidance/star-schema

Calender table:
https://radacad.com/all-in-one-script-to-create-calendar-table-or-date-dimension-using-dax-in-power-...

 

To help further, it would be necessary to see your data model. You can safely upload a sample version (without sensitive data) to any cloud storage (OneDrive, Google Drive, etc.) and share a view-only link.

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

There is no model its a query o/p 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.