Forum Discussion
Need Performance Improvement Suggestions
- 5 months ago
Hi All,
Thank you for your suggestions. johnt75 My model doesnt follow the standard date calendar, hence i cant use any of the time intelligence functions.
I have rewritten my DAX again - now i am getting results within less than 30 seconds, here is my new code.
Top N Display = VAR vTopN = selectedvalue('Top'[TopN]) VAR vPremium = [Current Year Premium] VAR vRank = IF( NOT ISBLANK(vPremium), Rankx(All Selected(customers[Customer Name]), Calculate( [Current Year Premium], AllSelected(Date), All(Policy), AllSelected('Calculation Type'), AllSelected('Customer Group') ), , Desc, Dense)) Return if (vRank<=vTopN, vPremium)Thanks everyone for your suggestions. I was unable to share the PBIX since my model was using live connection to a dataset.
Hi All,
Thank you for your suggestions. johnt75 My model doesnt follow the standard date calendar, hence i cant use any of the time intelligence functions.
I have rewritten my DAX again - now i am getting results within less than 30 seconds, here is my new code.
Top N Display =
VAR vTopN = selectedvalue('Top'[TopN])
VAR vPremium = [Current Year Premium]
VAR vRank =
IF( NOT ISBLANK(vPremium), Rankx(All Selected(customers[Customer Name]),
Calculate( [Current Year Premium],
AllSelected(Date),
All(Policy),
AllSelected('Calculation Type'),
AllSelected('Customer Group')
), , Desc, Dense))
Return
if (vRank<=vTopN, vPremium)
Thanks everyone for your suggestions. I was unable to share the PBIX since my model was using live connection to a dataset.