Forum Discussion
Weighted Measure
- 9 years ago
Anonymous
If you use AllSelected instead of All maybe give you the expected result.
You can use something like this with the newly added functionality Invoke Custom Function in Query Editor for this and It would be more creative solution as you can use them for other type of tasks as well.
To do so,
1.Add a Blank query and Write the below code:
(Qscore as number, Rscore as number,Sscore as number) => Qscore + Rscore + Sscore
2. Go to your original query and Under the Add Column Tab, Select Invoke Custom Function.
and Choose the appropriate options and it will give you desire results.
- Anonymous9 years agoNot applicable
Hello BhaveshPatel,
Thank you for the fast reply. But I dont have all the columns in the same table...
I tried with this:
Lead Time Ponderado test = SUMX( EM ; [Lead Time (columna)] * DIVIDE( EM[Unidades] ; CALCULATE( SUM( EM[Unidades] ); ALL( EM ) ) ) )
But this only applies correctly if I look at the total, if I apply any filter through a slicer sith measure isn't correct anymore.
It's the " ALL ( EM ) " from the calculate part that has to be variable, but I don't know how to do it.
- Vvelarde9 years agoCommunity Champion
Anonymous
If you use AllSelected instead of All maybe give you the expected result.
- Anonymous9 years agoNot applicable
Wow... it was that easy...
thank you so much :D