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

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

Reply
MAAbdullah_47
Helper V
Helper V

Calculating Non First Order Of the customer

Dear Experts

Please refer to this topic tutorial link: https://towardsdatascience.com/explore-the-potential-of-products-through-customers-purchase-behaviou...

Please refer to this topic tutorial link: https://towardsdatascience.com/explore-the-potential-of-products-through-customers-purchase-behaviou...

My question is regard the calculated column (IsFirstorder) as it said in the page :
" First, classify all orders for the sales table, in all orders of the customer, one or more orders with the earliest order date are classified as the first order, the rest are “non-first”:" , when I implemented it on my showcase it gives me (out of memory problem) this happen when I call the measure (CustPurchaseOthersSubcategoryAfter ) as on this image:

MAAbdullah_47_0-1642516846374.png

 

 

because the table I’m using it is above 10M rows not like the one used on the (Page tutorial) , Is there any alternatives such as :
1- Using custom column in Query editor?
Or
2-Using measure ,
or any other suggestion to avoid the out of memory and/or bad performance ?

6 REPLIES 6
Greg_Deckler
Community Champion
Community Champion

@MAAbdullah_47 What is the measure formula you are using?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi , I think the problem on the calculated column , IsFirstOrder 

MAAbdullah_47_0-1642518482878.png

 

@MAAbdullah_47 Not sure about that. Calculated column shouldn't generate DAX queries since it is already calculated at the time of creation or refresh so it shouldn't be the issue you are seeing, more likely an issue with the measure: CustPurchaseOthersSubcategoryAfter



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler 
When I try to install the Tool 

MAAbdullah_47_0-1642579309188.png

I need to save it how I can save it as (JSON) file , the option is only as a text , please check the screen-shot: 

MAAbdullah_47_1-1642579402555.png

 

"path": "E:\\MSHGQM_Gamma\\MicrosoftHatesGregsQuickMeasures\\MicrosoftHatesGregsQuickmeasures.exe",

☝️☝️

One more question: Is this correct text for witing the path?

@MAAbdullah_47 Yes, that is the correct syntax for the path, you have to use double backslash because it is a JSON file and you have to escape backslash characters so a \\ ends up being a single \.

 

You should be able to use the drop down for the Save As dialog and choose All files. Then it will write the file as a .json file and not tag .txt onto the end as an extension.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Still didn't been solved , @Greg_Deckler gives me generic answer , I need to find and do by my own.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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