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
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
Super User
Super User

@MAAbdullah_47 What is the measure formula you are using?


@ 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!:
The Definitive Guide to Power Query (M)

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


@ 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!:
The Definitive Guide to Power Query (M)

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.


@ 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!:
The Definitive Guide to Power Query (M)

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
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.

Top Solution Authors