The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
User | Count |
---|---|
16 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
8 | |
8 |