Forum Discussion
m_wex
Helper I
5 years agoAdding fields is impacting results
Using the following Dax to create top sales by part number. The total sales by part number come out correctly but when a description is added the result is impacted. For example, selecting top 5 with...
- 5 years agoSolved the issue. Added another field to the rankx calculation for description. Once this was implemented the problem solved.Total PN ales by Rank TEST =VARRankingDimesion=Values(Sales[Material])VarRankingSelect = [Ranking Select PN]ReturnCALCULATE([Total Sales],Filter( RankingDimesion,RankX(all(Sales[Material], Sales[Description]) ,[Total Sales], ,desc )<= RankingSelect))
m_wex
Helper I
5 years agoSolved the issue. Added another field to the rankx calculation for description. Once this was implemented the problem solved.
Total PN ales by Rank TEST =
VAR
RankingDimesion=Values(Sales[Material])
Var
RankingSelect = [Ranking Select PN]
Return
CALCULATE([Total Sales],
Filter( RankingDimesion,
RankX(all(Sales[Material], Sales[Description]) ,[Total Sales], ,desc )<= RankingSelect))