Forum Discussion

Irshadn03's avatar
Irshadn03
Frequent Visitor
4 years ago
Solved

Table Total is wrong

Hi, Created one measure for sales "[Test]" and showing the "Top" & "Bottom" items based on the Slicer ,  1) Total is showing only for "Top 10" not for "Bottom 10" 2) Total is wrong , it should be ...
  • Irshadn03's avatar
    4 years ago

    Got a solution, instead of calculating the Measure for total, created a measure for "Filter" based on the "Top 10" and "Bottom 10" ranking then put it on the Visual filter , now the total is matching and showing the total for "Top" & "Bottom" selection

    Agency_Filter =
    Var STop = if(ISBLANK(Sale_Table[Sales]),BLANK(),RANKX(ALLSELECTED(Product[Agency]),[Sales],,DESC,Dense))
    Var SBott = if(ISBLANK(Sale_Table[Sales]),BLANK(),RANKX(ALLSELECTED(Product[Agency]),[Sales],,ASC,Dense))
    Return
    if(and(SELECTEDVALUE('Rank'[Rank])="Agency",SELECTEDVALUE('Top'[Top])="Top 10"),STop,IF(and(SELECTEDVALUE('Rank'[Rank])="Agency",SELECTEDVALUE('Top'[Top])="Bottom 10"),SBott,1))