Forum Discussion
How to dynamically fetch sample data, using whatif parameter value or parameter value
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.
7 Replies
- MariuszCommunity Champion
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.
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
LinkedIn - IceyCommunity Support