Forum Discussion
Anonymous
6 years agoNot applicable
IF function optmization
Hello! I have a measure currently that compares a customer's "first sale date" (date of their first purchase) against my current calendar table date selections. My problem is that the DAX is taki...
Anonymous
6 years agoNot applicable
Hello Anonymous!
Thank you for your response, my answers are below:
- All tables in this model are one to many. There is one bi-directional relationship, but not on any of the relevant tables. The specific relationships are as follows:
- dim_cust(CustID) 1 --->--- * fct_cust_date(CustID)
- vw_dim_dates(dateid) 1 --->--- * fct_cust_date(CustID)
- dim_dates.date1 from an expanded column within Power Query from a related database table so that I can have the Customer's first sale date rather than just the first sale date id.
- Just one bi-directional relationship between two other tables (A Salesperson dimension and a lookup to a table that lists when a salesperson replaced another)
- I used the performance analyzer within Power BI which showed me that 98% of the loading time is attributed to DAX (203,796ms out of 207,277ms total load time). When I remove this specific measure, all things the same, the total time goes down to 1,471ms (87ms DAX). This is why I suspected that the specific measure was the culprit.
- I've never actually used the DAX Studio query analyzer. I'll look into that.
The measure is put into a table that only has customer account number and their Sales as the other fields. So MAX, once put into a table with each Customer on a row, ends up giving me their specific first sale date. The sales measure that's there is just a normal SUM( ) on the fact table.
When this single measure is removed from the single visual it's on, everything loads in less than 1500ms. When the measure is on the page, everything besides the visual this measure is on loads in less than 2500ms (I'm not sure exactly why everything increases in time). I'll try the DAX Studio analyzer to see if that gives me a little more insight.
Thank you,
Anonymous
6 years agoNot applicable
You say:
dim_cust(CustID) 1 --->--- * fct_cust_date(CustID)
vw_dim_dates(dateid) 1 --->--- * fct_cust_date(CustID)
The last one is not correct, I think.
Best
D
dim_cust(CustID) 1 --->--- * fct_cust_date(CustID)
vw_dim_dates(dateid) 1 --->--- * fct_cust_date(CustID)
The last one is not correct, I think.
Best
D