Forum Discussion

MarieAmell's avatar
MarieAmell
Frequent Visitor
3 years ago

TopN Slicer

Hi All,

 

I'd like to add a slicer to display the top 5, 10, 20 or All of my advertisers.

 

  • I have created a table "TopN_Value" as follow :

  • Then, I created the measure :
_Top N Adv = CALCULATE(
    [_Spends (€)]
    , TOPN(TopN_Value[Valeur N_value], ALL('Data'[Advertiser]), [_Spends (€)]), values('Data'[Advertiser])
)

 

  • It works when I have only spends by advertisers :

 

  • But when I want to add a legend, it doesn't work anymore :

 

If someone could explain to me what's wrong and how I can correct that, it would be awesome !

 

Thanks a lot

_____________________________________________________________________________________________________________________________

I'd like to have a slicer to select the number of advertisers to display : this model will be used by different people on different markets, and sometimes, we'll have 15 advertisers, so we could display them all, but sometimes, we have many more.

I have created a slicer, which works when I have only the total by advertisers, but on the 2 graphs below I'd like to display the same 5, 10, 20 or All advertisers, with the detail of media or by month, the top 5, 10 or 20 adv, and it doesn't work.

I have attached the file, if someone could have a look and give me a solution, it would be very nice πŸ˜Š

Thanks a lot in advance for your help.

Regards