Forum Discussion
Calculate total rows based on slicer selection
FreemanZ here count of weight =14 is just given for reference, it will change based on slicer selection and its dynamic. In above table there are 14 rows hence count is 14 , if there are 4 rows i should see weight as 25% for each row.
Hi binayjethwa
Not sure if i fully get you, then try
Measure =
VAR _bl =SELECTEDVALUE(TableName[ BLs/subsidiaries])
VAR _count =
COUNTROWS(
FILTER(
ALL(TableName),
TableName[BLs/subsidiaries] = _bl
)
)
RETURN
DVIDE(100, _count)- binayjethwa3 years ago
Helper V
FreemanZ The above measure is working fine with single selection , but if i do multiple selections i see weight is calculated sepatately. even if i do multiple selections , for example 2 BL/subsidaries , it should take total count of selected BL/s and divide by 100 as a whole. can you please suggest how we can achieve this.
- FreemanZ3 years ago
Super User
hi binayjethwa
try like:
Measure =VAR _count = COUNTROWS(TableName)RETURN DIVIDE(100, _count)it worked like this:if it doesn't work, please consider expand your data sample to fully represent the issue and expectation. And continue @me, if furthere suggest is needed.