Forum Discussion
TOPN Measure Results in Column Incorrect
- 5 years ago
Anonymous
Hi,
Please try the below.
I am not sure whether it gives the correct result or not, but I think you can try to create similar to the below measures.
Recent 10 dates rank =VAR currentsalesp =MAX ( data[Salesperson ID] )VAR currentcustomer =MAX ( data[Customer ID] )VAR currentstate =MAX ( data[State] )VAR rankrecent10dates =RANKX (FILTER (ALLSELECTED ( data ),data[Salesperson ID] = currentsalesp&& data[Customer ID] = currentcustomer&& data[State] = currentstate),CALCULATE ( MAX ( data[Sales Date] ) ),,DESC)RETURNIF ( NOT ISBLANK ( [Sales] ), rankrecent10dates )Recent 10 dates Sales =VAR newtable =FILTER (SUMMARIZE (ALLSELECTED ( DimDates ),DimDates[Date],"@sales", [Sales],"@rank", [Recent 10 dates rank]),[@rank] <= 10)RETURNIF ( NOT ISBLANK ( [Sales] ), SUMX ( newtable, [@sales] ) )Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
All sales which fall between 12 March and 1 April form part of the latest 10 sales which if all sales are summed up between that range is 50
Anonymous
Hi,
Please try the below.
I am not sure whether it gives the correct result or not, but I think you can try to create similar to the below measures.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
- Anonymous5 years agoNot applicable
Thank you Jihwan_Kim it worked 🙂