Forum Discussion
abiyevnijat
2 years agoFrequent Visitor
PowerBI dynamic columns based on slicer
Hello everyone, Business Time % = IF ( 'Dashboard'[Business] < [SLA Time], 1, [SLA Time] / 'Dashboard'[Business] ) I have calculated column in my main table (Dashboard). My SLA Time measure...
- 2 years ago
Hi abiyevnijat ,
For this you need to use a different measure. Try the following measure:
Business Time % = VAR temptable = ADDCOLUMNS ( 'Dashboard', "@BusinessTime%", IF ( 'Dashboard'[Business] < SELECTEDVALUE ( 'Slicer'[Slicer] ), 1, SELECTEDVALUE ( Slicer[Slicer] ) / 'Dashboard'[Business] ) ) RETURN AVERAGEX ( temptable, [@BusinessTime%] )See PBIX file attach.
abiyevnijat
2 years agoFrequent Visitor
Business Time % =
IF ( 'Dashboard'[Business] < [SLA Time], 1, [SLA Time] / 'Dashboard'[Business] )
with this formula I can get the answer. But I have SLA Time = 2 measure and I change this manually. I want to add slicer (dropdown) visual which values from 1 to 48. When I select my value in slicer I want to get my value in Business Time % column according to the slicer value.
MFelix
Super User
2 years agoHi abiyevnijat ,
You need to create a new measure to use on your visualizations, you cannot update values on a table using a slicer.
So in this case the Business Time % needs to be a measure also and not a calculated column on your model, that way you get the expected result that is dynamic based on the what if parameter measure.