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.
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.
Thanks for the reply!
I was able to make it dynamic, but now I have another issue. Here is the post I made (there is a comment with a link with the file). https://community.powerbi.com/t5/Desktop/Need-some-help-with-calculated-measures-with-filters/m-p/1811667#M704839
Hope you can help me.
Regards
- v-janeyg-msft5 years agoCommunity Support
Hi, GoncaloCare
Due to the nature of the work, I can't interfere with other cases. For your other needs, what I want to say is that if you use 'filter on all pages', the context will be fixed and there is no way to change it so it maybe cause problems. You can try to use 'filter on this visual' or 'filter on this page'.
My suggestion is that you can use 'sync slicers' in multiple pages to achieve the same effect, but you can also unfilter a visual individually.Reference:
Slicers in Power BI - Power BI | Microsoft Docs
Change how visuals interact in a report - Power BI | Microsoft Docs
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.