Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Top N Matrix Problem

I'm working on creating a matrix that will look something like this: Branch Name    Monthly Sales   % Of Grand Total      # Of Sales People Branch 4                    $444,444                  36....
  • amitchandak's avatar
    3 years ago

    Anonymous , if need grand total to owner the filters

     

    % of Total= Divide(SUM(BRANCH_SALES[TOTAL_SALES]), calculate(SUM(BRANCH_SALES[TOTAL_SALES]), allselected()) )

     

    filter should not be consider 

     

    % of Total= Divide(SUM(BRANCH_SALES[TOTAL_SALES]), calculate(SUM(BRANCH_SALES[TOTAL_SALES]), all()) )

     

     

    Prefer TOPN as visual level filter

     

    TOPN: https://youtu.be/QIVEFp-QiOk

     

    refer if needed

    https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/367415

  • Ashish_Mathur's avatar
    3 years ago

    Hi,

    Do these measures work?

    Monthly sales = SUM(BRANCH_SALES[TOTAL_SALES])

    Montly sales of all branches = calculate([Monthly sales],all(BRANCH_SALES[Branch Name]))

    % of Grand total = divide([Monthly sales],[Montly sales of all branches])

    Hope this helps.