Forum Discussion
Calculate Variation dynamically
- 5 years ago
Hi, GoncaloCare
If I understand what you mean, Do you want the value of Query3[MAT] to be dynamic?
You can try to create a single distinct list(distict(Query3[MAT])), then use this new table column as slicer. And use selectedvalue function to distinguish different values in two different tables.
-> for the first value: Mat1valor = CALCULATE(SUM(Query3[EUR]), Query3[MAT]=selectedvalue(Query3[MAT])) -> for the second value: VariacaoMAT1 = ( ( [Mat1valor] / CALCULATE(SUM(Query3[EUR]),selectedvalue(table[MAT]) ) - 1 ))If it doesn’t solve your problem, please share some sample fake data and your desired result,then feel free to ask me.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I do understand you can select the entry for the first measure. But to be able to select an entry for the second measure... you have to have another table. So, in a word, one table for the selection of the first measure, a second independent table for the selection for the other measure. This is how you do it.
Alternatively, you could have one table with combinations like ("Mat1", "Mat2") where a selection will immediately fix the entry for the first measure and the second.
It's up to you how you want to do it.
Hi. So, I have the table for the second option.
If I select this option on the filters:
How can I check on the measure which value is selected, and on the variation, get the MAT2 using the new table with the combinations?