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
Pbi07
Helper V
Helper V

FIRSTNONBLANK issue

I was getting a memory issue with FITSTNONBLANK function. Anyone faced a similar issue or is there a better approach to the below issue. 

I have 2 tables. 

Entry CodeContract Name
T1040EVERGREEN
A2002LAKE HOME
63283EVERGREEN

Plan - 

Entry CodeName
T1040Evergreen

 

I have a summary table created for additional calculations . Table is based on the main table for which an entry code do not exist in plan table. 

I have created a colum - ALT Code  to search for the contract name and call out the Entry code that exist for the similar contract name

The Expected result is below. This works fine in the model. But when i have a larger data, i am getting a memory error and i am not sure if i am doing this right or is there a better approach to do the search. I cannot do a Vlookup as there could be multiple entry code and i am picking only the first entry code.  

 

Entry CodeContract NameAlt Code
63283EVERGREENT1040
A2002LAKEHOME 

 

Model is attached. Please note that the function is working fine in this model, but fails with a larger data with the error 

 

" There's no enough memory to comlete this operation" 

 

https://drive.google.com/file/d/103KSquQOzzbEQt7i3Sj5b95M9LDHNdtg/view?usp=sharing

 

 

6 REPLIES 6
v-jingzhang
Community Support
Community Support

Hi @Pbi07 

You may try below codes:

Sum_table 2 =
FILTER (
    SUMMARIZE ( 'Table', 'Table'[Entry Code], 'Table'[Contract Name] ),
    NOT ( 'Table'[Entry Code] IN VALUES ( Plan[Entry Code] ) )
)
Alt code =
CALCULATE (
    MIN ( 'Table'[Entry Code] ),
    VALUES ( 'Table'[Entry Code] ),
    'Table'[Contract Name] = EARLIER ( 'Sum_table 2'[Contract Name] ),
    'Table'[Entry Code] <> EARLIER ( 'Sum_table 2'[Entry Code] )
)

Kindly let me know if this helps.
Community Support Team _ Jing Zhang
If this post helps, please consider Accept it as the solution to help other members find it.

Thanks @v-jingzhang 

 

I ended up using 2 columns and splitting the logic as any way i needed 1 of the column for another visual. Thanks for the suggestion.

parry2k
Super User
Super User

@Pbi07 not sure if I understood the problem, it should be as simple as that given the relationship

 

Alt Code = RELATED ( PlanTable[Entry Code] )

 

Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

m3tr01d
Continued Contributor
Continued Contributor

@Pbi07 It is 1 to Many but you are using Bidirectionnal filter.

Do you really need a Bidirectional filter? You can have a lot of side effect and bad performance on your model.

How many rows are we talking in these tables?

parry2k
Super User
Super User

@Pbi07 since your sample data has very few rows, in your real model, how these tables are related? 1 to Many or Many to Many?

 

Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k 

 

It is 1 to Many relation for Plan -> Table

 

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.