Forum Discussion
ignore RLS for a aggregated measure
do you have a sample of the code. I will for sure look into the function and try to solve my problem with calculatetable
Hi,
Here is the code to create my consolidated table :
Nb Products (%age byOrigin) =
VAR ListCountry =TREATAS(VALUES(Products[Origin]),Products[Origin])//Create list with level of conso you need
VAR NbProducts =COUNTA(Products[SKU_Number])//Count of product number/ref
RETURN
FILTER(SUMMARIZECOLUMNS
(
ROLLUPADDISSUBTOTAL
(
Products[Origin], "IsCountruSubTotal", ListCountry ),//Create sub totals
"Share in %", //Name of column created
DIVIDE(COUNTA(Products[SKU_Number]),NbProducts )),//Calculation of %age
NOT(ISBLANK(Articles[Origine]))//option (Filter to get rid of blanks)
)
And then I create my visuals based on this table, and not on the original one.
Let us know