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.
MFelix
2 years agoSuper User
Hi abiyevnijat ,
For this you need to use a What If parameter.
https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-what-if
This will allow to have a slicer where you select the SLA time and use the metric on your calculations.
- abiyevnijat2 years agoFrequent Visitor
Thanks for quick response. I visited this link, but I cant get suitable information for my problems. I create parameter table and added to slicer,but I cant get wanted result. All rows in my column display null when I change slicer.