The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
I currently have a sliding scale that allows me to change the scale from 0.5 to 5.0. If I change the scale to 0.5, all the data is multiplied by 0.5. Is there a way to isolate one color and only apply the scale to that, and leave the other data unchanged? If no, is there a workaround for this? All the data is in one dataset.
For example, I'd like 3.0 to be applied to Green, so the scaled volume should be 60 whilst the rest remained the same as how it's shown in the table.
Color Scale Raw Volume Scaled Volume
Red 1 100 100
Orange 1.5 50 75
Yellow 2 10 20
Green 0.5 20 10
Blue 2 30 60
Purple 0.5 50 25
@Anonymous Maybe:
Scaled Volume Measure =
IF(MAX('Table'[Color])="Green",[Raw Volume] * [Scale Factor],[Raw Volume])
I am using a sliding scale visual so I can change the scale. How would you write the equation if the sliding scale needs to be incorporated?
@Anonymous That's the [Scale Factor] measure. Generally what you want to do for that is to create a "What if" parameter and this comes along with a single select slicer and a measure that uses SELECTEDVALUE for that slicer. I assumed that you already had this but if not, go do that and then use the measure created for [Scale Factor] in your formula.
@Anonymous
I'm trying to do that on a sliding scale for colors. There are two parameters, scale and color. When I replace the Sheet1[Color] with the colors scale parameter, it doesn't work. The color parameter should be text, not numbers (not sure what's the solution for this).
You could have one parameter set up for the scaling factor and another parameter for which colors you want to apply it to. Then write a measure that applies only to the selected colors. Something like this:
Scaled Volume =
VAR SelectedColors = VALUES ( ParamColor[Color] )
VAR ScaleFactor = SELECTEDVALUE ( ParamScale[Scale] )
RETURN
SUMX (
VALUES ( Table1[Color] ),
IF (
Table1[Color] IN SelectedColors,
[Raw Volume] * ScaleFactor,
[Raw Volume] * [Scale]
)
)
@AlexisOlson
I added two parameters, one for color and scale. The table is no longer working with the sliding scale. The Color parameter is also in numbers, not sure how to turn it into text (red, blue, yellow etc). I am receiving a "Calculation error in measure STORE[Volume Change from Scale]. Function 'CONTAINSROW' does not support comparing values of type Integer with values of type Text. Considering using the VALUE or FORMAT function to convert one of the values." message.
User | Count |
---|---|
14 | |
12 | |
7 | |
6 | |
5 |
User | Count |
---|---|
28 | |
18 | |
13 | |
7 | |
5 |