Forum Discussion
ignore RLS for a aggregated measure
do you mean to merge the two tables or to use the function calculatetable?
I was thinking of CALCULATETABLE. That's what I did in a project to keep the display of the percentage of different region, even when RLS was applied to a region.
The RLS should not affect the calcultation of your calculatedtable.
- Anonymous4 years agoNot applicable
do you have a sample of the code. I will for sure look into the function and try to solve my problem with calculatetable
- AilleryO4 years ago
Memorable Member
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