Forum Discussion

3 Replies

  • yatheeshaworks , I got the example for the Top 10 example in the filter context on the tableau website . In power BI it is always included in the context, Exclude from context require coding

     

    This is excluded in the context

    All will ensure top 10 is always  in

    TOP 10 State City all = CALCULATE([Net], TOPN(10,SUMMARIZE(all(Sales), Geography[State], Geography[City]),[Net],DESC), VALUES(Geography[State]), VALUES(Geography[City]))

     

     

    This is included in the context
    TOP 10 State City allsel = CALCULATE([Net], TOPN(10,SUMMARIZE(ALLSELECTED(Sales), Geography[State], Geography[City]),[Net],DESC), VALUES(Geography[State]), VALUES(Geography[City]))