Forum Discussion
Bottom Sorting with same customer name value
- Anonymous1 year ago
Hi Anonymous ,
Try to modify formula provided by amitchandak for better performance like below:
Current Year top 3 = CALCULATE( SUMX( TOPN(3, ALLSELECTED(DimCustomer[CustomerSk]), [Current Year], ASC), [Current Year] ), REMOVEFILTERS(DimCustomer[CustomerSk]) )Last Year top 3 based on current = CALCULATE( SUMX( TOPN(3, ALLSELECTED(DimCustomer[CustomerSk]), [Current Year], ASC), [Last Year] ), REMOVEFILTERS(DimCustomer[CustomerSk]) )If you still encounter memory issues, consider reducing the amount of data being processed or optimizing your data model.
Best Regards,
Adamk KongIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous , In a visual you can use TOPN Visual level filter.
Or Create two TOPN Measure but both measure should use current Year for TOPn
Current Year top 3 =
Sumx(keepfilters(topn( 3, allselected(DimCustomer[CustomerSk]) ,[Current Year], asc)),[Current Year])
Last Year top 3 based on current =
Sumx(keepfilters(topn( 3, allselected(DimCustomer[CustomerSk]) ,[Current Year], asc)),[Last Year])
TOPN: https://youtu.be/QIVEFp-QiOk
TOPN with Numeric Parameter -https://youtu.be/cN8AO3_vmlY?t=26448
This solution take too much time to load.....and display the error in powerbi has not engouh memory to perfrom this opration.