Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi
I have created a sample table using the Dax sample
Sample data = SAMPLE(30, FILTER('Table 1', 'Table 1'[Field] = "Values"),0)
This works fine.
After that I have created a WhatIf Parameter so that i could use it to pull the data to a certain record count.
What if Parameter :
I have then used the parameter value to generate the sample data.
Sample data = SAMPLE('Sample Pull'[Sample Pull Value], FILTER('Table 1', 'Table 1'[Field] = "Value"),0)
Have also tried the below .
In this example it seems to only pickup the default value from the what if parameter which is in my case 30 as written in the code above.
Hi @ysf
SAMPLE returns a table and both columns and tables are loaded when on data load/refresh, therefore, you will not be able to make an impact on it with a measure as the data has loaded already.
You can create a Power Query parameter and combine it with SAMPLE DAX function I guess.
Hi @Mariusz
I have created a a parameter via PowerQuery but gives the same results when using its selected value.
the main intention is to allow for end users to decrease or increase the number of records to sample.
Thanks @Mariusz this helps in that I can change the paramenter value on the service myself, but it still needs more work if the report consumers want to change the parameter value so as increase the rows returned. I am guessing its not available right now.
Hi @ysf
Yes, unfortunately, the only way I know of change the parameters in the service is by going to settings of the dataset.
You can create an Idea for this here if no one has yet as it seems like a good one.
Hi @ysf
Please see the attached file with a solution that combines what-if parameters and Table visual filtered by Measure. Hope this is close enough to what you need.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 66 | |
| 44 | |
| 40 | |
| 29 | |
| 19 |
| User | Count |
|---|---|
| 200 | |
| 126 | |
| 103 | |
| 70 | |
| 53 |