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 got a below scenario. slicer value will be distinct of col1 and col2 and then pass slicer selection value to plan col1 and col2 and create a dynamic calculated column
id,issue,plan
1,av,av
2,av,rm
3,rm,av
slicer -
distinct(union(issue,plan))
av
rm
when slicer value is selected -> case when plan like value(slicer) then "direct" else "indirect" (if the selected value is available in plan column then dislay direct else indirect)
slicer = av
table output
id,issue,plan, calc
1,av,av , direct
2,av,rm , indirect
3,rm,av , direct
slicer = rm
id,issue,plan, calc
2,av,rm , direct
3,rm,av , indirect
i tried to implement the approach using dax. created cal measure of selected slicer value
selected value= if(hasonevalue(slicer),values(slicer),blanlk()
not sure passing the selected slicer value to create calc column.
attchaed code snippet of sql query of above approach.
Solved! Go to Solution.
Hi @aj1107,
Not like measures, calculate columns/tables are computed during database processing(e.g. data refresh) and then stored in the model, they do not response to user selections on the report.
So it is not possible to create a calculate column/table can change dynamically with user selections on the report.
In this scenario, you can create a measure instead, then show the measures on the Table/Matrix visual with the corresponding columns from your table. The formula below to create the measure is for your reference.
measure = IF ( HASONEVALUE ( Table2[slicer] ), IF ( VALUES ( Table2[slicer] ) = FIRSTNONBLANK ( Table1[plan], 1 ), "direct", "indirect" ) )
Regards
Hi @aj1107,
Not like measures, calculate columns/tables are computed during database processing(e.g. data refresh) and then stored in the model, they do not response to user selections on the report.
So it is not possible to create a calculate column/table can change dynamically with user selections on the report.
In this scenario, you can create a measure instead, then show the measures on the Table/Matrix visual with the corresponding columns from your table. The formula below to create the measure is for your reference.
measure = IF ( HASONEVALUE ( Table2[slicer] ), IF ( VALUES ( Table2[slicer] ) = FIRSTNONBLANK ( Table1[plan], 1 ), "direct", "indirect" ) )
Regards
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 |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |