Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

DAX SAMPLE: how to refresh?

Hi folks,

 

looking for some help on getting a random sample to refresh. Client wants a visual that displays a random comment from customer feedback and associated data. 

 

Goal:

- small sample table that refreshes

 

Tried:

- Built a sample data table, however it doesn't refresh, just shows the same comment.

- RANDBETWEEN this gives me a randome int but can't use it to reference or build a relationship between this and the comment table?

 

I'm thinking I need something with both but can't figure out the expression to put it together?

 

Thank you!

 

4 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    If you added an Index to your Comment table and used RANDBETWEEN to generate a number, which you then used to pick that Index from the Comment table, would that work?

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for the reply! I built a measure with RANDBETWEEN off the index of the comment. I'm trying to use the Card Browser visual which isn't letting me use the measure as a data field for the ID?

       

      Anyway to force refresh a sample in the table formula?

       

      Thank you!

      • Greg_Deckler's avatar
        Greg_Deckler
        Icon for Community Champion rankCommunity Champion

        Hmm, not familiar with the Card Browser visual. I don't think that the standard Card visual has that limitation. Tables only refresh at load/refresh time while measures are calculated "on the fly" so I don't see a way to do it without using a measure.

  • v-juanli-msft's avatar
    v-juanli-msft
    Icon for Community Support rankCommunity Support

    Hi Anonymous

    Could you show a example?

    Based on my understanding, you want to click on one button /select a item in a slicer, then a card visual or a table visual show a line of record which is assicated with the selected item, right?

     

    when we say "refresh" in Power BI, It means to refresh data from the data source and return the lastest data into power bi, then you can use the lastest data in power bi report.

    From your information, it seems you don't mean this kind "refresh", right?

     

    If you'd like to give me more information, i'm much more willing to provide more suggestions per your requirements.

     

    Best Regards

    Maggie