Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi Guys!
I'm encountering an problem in which i want to acheive what if parameters functionality because i'm using Report server and it won't work on RS , i need to use same working like pattern , now if i want to get all the values of a column in a measure how can i do it just like SQL query in which e.g select col1 from tab1; i want to achieve same thing in dax
Solved! Go to Solution.
 
					
				
		
Hi @zainqazi96 ,
You can use reference in the power query first and then convert the table by unpivot column and remove the unwanted columns.
then create below formula in powerbi, enabling dynamic selection of column name in the slicer.
slicer_by_columnName = VALUES('Table (2)'[Attribute])
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
 
					
				
		
Hi @zainqazi96 ,
You can use reference in the power query first and then convert the table by unpivot column and remove the unwanted columns.
then create below formula in powerbi, enabling dynamic selection of column name in the slicer.
slicer_by_columnName = VALUES('Table (2)'[Attribute])
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @zainqazi96,
Can you please try the following:
1. Create a Calculated Table
DistinctColumnValues = DISTINCT('TableName'[ColumnName])
2. Use the calculated table to create a slicer in your report
3. Create a Measure to Reflect the "What If" Selection
DynamicMeasure = 
VAR SelectedValue = SELECTEDVALUE('DistinctColumnValues'[ColumnName], "Default Value")
RETURN
CALCULATE(
    [YourCalculation],
    FILTER(
        'TableName',
        'TableName'[ColumnName] = SelectedValue
    )
)
Hope this helps!
@Sahir_Maharaj i don't get it , how can i use column name in slicers , based on dynamic selections
 
					
				
				
			
		
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
 
            | User | Count | 
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | 
| User | Count | 
|---|---|
| 23 | |
| 12 | |
| 11 | |
| 10 | |
| 9 |