Forum Discussion
Kimcha
9 years agoAdvocate I
Slicer on summarized values
I have a table that is grouped by "Page" and with sum and counts of pageviews, signups and signups %. I would like to filter it to show only rows where pageviews are lower than x or signup...
- 9 years ago
Hi Kimcha,
Perhaps you could try below steps.
Create a calculated table which lists all options you want to allow users to select from a slicer. Later, you should add this column into slicer.
DataTable = DATATABLE("Selection",Integer,{{10},{300},{500}})Create measures like below:
Measure page viewers = IF ( ISFILTERED ( 'DataTable'[Selection] ), CALCULATE ( SUM ( 'Page table'[unique page viewers] ), FILTER ( 'Page table', SUM ( 'Page table'[unique page viewers] ) <= MAX ( 'DataTable'[Selection] ) ) ), CALCULATE ( SUM ( 'Page table'[unique page viewers] ), FILTER ( 'Page table', 'Page table'[unique page viewers] <= MAX ( 'Page table'[unique page viewers] ) ) ) ) Measure signups = IF ( ISFILTERED ( 'DataTable'[Selection] ), CALCULATE ( SUM ( 'Page table'[signups] ), FILTER ( 'Page table', SUM ( 'Page table'[unique page viewers] ) <= MAX ( 'DataTable'[Selection] ) ) ), CALCULATE ( SUM ( 'Page table'[signups] ), FILTER ( 'Page table', 'Page table'[unique page viewers] <= MAX ( 'Page table'[unique page viewers] ) ) ) ) Measure signups% = IF ( ISFILTERED ( 'DataTable'[Selection] ), CALCULATE ( SUM ( 'Page table'[signups %] ), FILTER ( 'Page table', SUM ( 'Page table'[unique page viewers] ) <= MAX ( 'DataTable'[Selection] ) ) ), CALCULATE ( SUM ( 'Page table'[signups %] ), FILTER ( 'Page table', 'Page table'[unique page viewers] <= MAX ( 'Page table'[unique page viewers] ) ) ) )
Then, add above measures into table visual.
Best regards,
Yuliana Gu
v-yulgu-msft
9 years agoMicrosoft Employee
Hi Kimcha,
Perhaps you could try below steps.
Create a calculated table which lists all options you want to allow users to select from a slicer. Later, you should add this column into slicer.
DataTable = DATATABLE("Selection",Integer,{{10},{300},{500}})
Create measures like below:
Measure page viewers = IF ( ISFILTERED ( 'DataTable'[Selection] ), CALCULATE ( SUM ( 'Page table'[unique page viewers] ), FILTER ( 'Page table', SUM ( 'Page table'[unique page viewers] ) <= MAX ( 'DataTable'[Selection] ) ) ), CALCULATE ( SUM ( 'Page table'[unique page viewers] ), FILTER ( 'Page table', 'Page table'[unique page viewers] <= MAX ( 'Page table'[unique page viewers] ) ) ) ) Measure signups = IF ( ISFILTERED ( 'DataTable'[Selection] ), CALCULATE ( SUM ( 'Page table'[signups] ), FILTER ( 'Page table', SUM ( 'Page table'[unique page viewers] ) <= MAX ( 'DataTable'[Selection] ) ) ), CALCULATE ( SUM ( 'Page table'[signups] ), FILTER ( 'Page table', 'Page table'[unique page viewers] <= MAX ( 'Page table'[unique page viewers] ) ) ) ) Measure signups% = IF ( ISFILTERED ( 'DataTable'[Selection] ), CALCULATE ( SUM ( 'Page table'[signups %] ), FILTER ( 'Page table', SUM ( 'Page table'[unique page viewers] ) <= MAX ( 'DataTable'[Selection] ) ) ), CALCULATE ( SUM ( 'Page table'[signups %] ), FILTER ( 'Page table', 'Page table'[unique page viewers] <= MAX ( 'Page table'[unique page viewers] ) ) ) )
Then, add above measures into table visual.
Best regards,
Yuliana Gu
navin1491
7 years agoFrequent Visitor
v-yulgu-msft Kimcha This is amazing. This is what I've been unsuccessfully trying to do for the last few weeks. I have one more question here. Would the current slicer work in conjunction with a date slicer. Thanks!