I tried using window_corr() function with filter but since the value of window_corr() is not stored in a variable it cannot be used for further calculation.
I also tried using sets but since the return value of the sets is boolean i cannot perform corr() on it.
Good morning @M G
as I understand the question you want to create the correlation of values in the viz (the summary level of the data table) and have used window corr to get the correct value BUT you can not use on another sheet or calculation. Window functions are specific to the sheet where they are used BUT you can use nested LODs to get the same result and that value is portable
see the attached
I started with converting the 2 measures to lods like this
{ FIXED [Sub-Category]:sum([Profit])}
and
{ FIXED [Sub-Category]:sum([Sales])}
the loss returns the "summary level you want" but are not aggregates in themselves and can be used in this
{ FIXED : CORR( zn([lod sales]),zn([lod profit]))}
see the red tabs