Forum Discussion
Slicer for certain values
- Anonymous2 years ago
Hi MurtoMan ,
The Table data is shown below:
Please follow these steps:
1. Use the following DAX expression to create a TableTable 2 = GENERATESERIES(1,100,1)2.Use the following DAX expression to create a measure
Result = VAR _a = SELECTEDVALUE('Table'[Item]) VAR _b = SELECTEDVALUE('Table'[Factor]) VAR _c = SELECTEDVALUE('Table'[Value]) RETURN IF( _a = "Shoes", DIVIDE(_b,100) * MAX('Table 2'[Value]) * _c , _b * _c )3.Use the following DAX expression to create a measure
_Factor = IF( SELECTEDVALUE('Table'[Item]) = "Shoes", DIVIDE(SELECTEDVALUE('Table'[Factor]),100) * MAX('Table 2'[Value]),SELECTEDVALUE('Table'[Factor]))4.Final output
Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Yes the expected outcome is to change values in column 'Value A' with a slicer.
But indexing doesn't work in my case because max index is restricted to 1000. However, I have several million rows in my data.
Hi Anonymous
Let's put it in this way.
I have a table like this and I want to change the factor with a slicer in Power BI Desktop.
It's easy to create a slicer like this for factor values
But I want to turn the values in the slicer for shoes only from real values to percents (between 0 - 100).
What is the way to do that?
- Anonymous2 years agoNot applicable
Hi MurtoMan ,
The Table data is shown below:
Please follow these steps:
1. Use the following DAX expression to create a TableTable 2 = GENERATESERIES(1,100,1)2.Use the following DAX expression to create a measure
Result = VAR _a = SELECTEDVALUE('Table'[Item]) VAR _b = SELECTEDVALUE('Table'[Factor]) VAR _c = SELECTEDVALUE('Table'[Value]) RETURN IF( _a = "Shoes", DIVIDE(_b,100) * MAX('Table 2'[Value]) * _c , _b * _c )3.Use the following DAX expression to create a measure
_Factor = IF( SELECTEDVALUE('Table'[Item]) = "Shoes", DIVIDE(SELECTEDVALUE('Table'[Factor]),100) * MAX('Table 2'[Value]),SELECTEDVALUE('Table'[Factor]))4.Final output
Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. - MurtoMan2 years agoHelper I
Big thanks Anonymous !
Now it works like a charm 😊
- MurtoMan2 years agoHelper I
One extra question.
Is there a way to show total SUM of this Result column?