Forum Discussion
PowerBI dynamic columns based on slicer
- 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.
To achieve the desired result of dynamically calculating the Business Time % based on the selected value from a slicer dropdown visual, you can follow these steps:
Create a new measure in your main table (Dashboard) using the following formula:
Business Time % =
IF ( 'Dashboard'[Business] < SELECTEDVALUE('Slicer'[Value]), 1, SELECTEDVALUE('Slicer'[Value]) / 'Dashboard'[Business] )
Create a new table (Slicer) with a single column (Value) containing values from 1 to 48.
Add a slicer visual to your report using the ‘Value’ column from the ‘Slicer’ table.
Selecting a value from the slicer will dynamically update the ‘Business Time %’ measure based on the selected value and the corresponding value in the ‘Business’ column of your main table.
If you find this insightful, please provide a Kudo and accept this as a solution.
- abiyevnijat2 years agoFrequent Visitor
Thanks for answer. But, I want my Business Time % not in measure. I want to see my values in all rows in Business Time % according to Business Column. For example, when I select 4 in dropdown which is my SLA Time, I want to see in
Business Time % =IF ( 'Dashboard'[Business] < [SLA Time], 1, [SLA Time] / 'Dashboard'[Business])
which all rows gives answer according to Business Column. I got this result whem I create SLA Time measure and change manually. But, I want do this dynamically with slicer