Forum Discussion

PiyushH1's avatar
PiyushH1
Helper I
6 years ago

parameters to use as Slicer

Hi Team,

Haapy New Year !!!

 

I am working on currency exchnage rate BI report.  i have set up GBP, EUR &CNY as parameters , means when i select any of these three currency then rest of the currency i.e , LIRA , INR,PLN etc ...will convert automatically.

 

but , using parameters  then apply chnages it's take long time.

is there any way we can use parameters in Slicer to to get filter done very quicky ?

 

2nd question is , while i am pubilisin BI service , i cannot do sehedule reference due below error ? - can you please help me ?

 

" Query contains unsupported function.Function name : Web.Contents"

 

Regards,

Piyush

6 Replies

  • Jimmy801's avatar
    Jimmy801
    Community Champion

    Hello PiyushH1 

     

    A happy new year also to you.

    I don't know how your data model is looking like and what exactly you mean by parameter (parameter of power query?).

    I would suggest to create a new table with the exchange rate, and implementing an disconnected slicer. A measure can then change the exchange rate due to slicer selection. And it works pretty fast.

     

    Here i prepared a example file for you link 

     

    If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
    Kudoes are nice too

    Have fun

    Jimmy

    • PiyushH1's avatar
      PiyushH1
      Helper I

      Hi Jimmy,

      Thank you for your update.

      Yes, parameter is from power query.

       

      I am using below code on exchange rate 

       

      let
          Source = (Date as text) => let
              C=currency,
              Source = Json.Document(Web.Contents("https://api.exchangeratesapi.io/" & Date & "?base="&C&"")),
              rates = Source[rates],
              #"Converted to Table" = Record.ToTable(rates),
              #"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Name", "Currency"}, {"Value", "Rate"}})
          in
              #"Renamed Columns"
      in
          Source

       

       

       

      • Jimmy801's avatar
        Jimmy801
        Community Champion
        Hello

        I would suggest to create a static table with exchange rates that are then updated with your query that is then used by the measure to calculate it

        Jimmy
  • Jimmy801's avatar
    Jimmy801
    Community Champion

    Hello

    have you been able to solve the problem with the replies given?

     

    If so, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
    Kudoes are nice too

    All the best

    Jimmy