Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a table with thousands of rows. Instead of displaying all the items, I would like to display 10 random rows of data every time to report loads. Is there an easy way to accomplish this?
Regards,
JingSpat
Solved! Go to Solution.
hi @Jingspat
You may use RAND() in DAX either as a calculated column but I would prefer a measure as RAND in a measure is not always recalculated (reference).
I tested how RAND works in a measure. Here's what I did:
ramdom measure = RAND()
Proud to be a Super User!
hi @Jingspat
Which one is your goal?
-select just 10 random rows in power query and then load it to the model
-randomly choose 10 rows of the dataset already loaded to the model
Proud to be a Super User!
@danextian Sorry for not being clear. I am relatively new to all this and am not sure of the proper terminology yet. I am using a table visualization that returns thousands of rows and then adds a scroll bar on the report, but I just want it to display 10 randomly selected rows of data and no scroll bar. I believe this correlates to your second scenario "randomly choose 10 rows of the dataset already loaded to the model."
Thanks so much!
hi @Jingspat
You may use RAND() in DAX either as a calculated column but I would prefer a measure as RAND in a measure is not always recalculated (reference).
I tested how RAND works in a measure. Here's what I did:
ramdom measure = RAND()
Proud to be a Super User!
I can't seem to change the Visual level filter to anything other than "is less than" - it won't let me click the drop down box, but I can enter a value. What am I doing wrong?
Hi @Jingspat,
There is no Top N option for measures. Please select Index and then choose Top N under filter types then drag random measure to By Value.
Proud to be a Super User!
Sorry for not getting it! I still can't change the filter type of Index:
Here is the modeling tab for the Index column:
are you not seeing this option?
Proud to be a Super User!
I wasn't. I just updated to the latest version and now it is working! Thank you so much for the help!!!!
Appreciate it!
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
126 | |
106 | |
105 | |
86 | |
72 |