Forum Discussion
Use Slicer data in a smart narrative
- 4 years ago
HI Anonymous ,
You can try creating a measure using the values concatenated from all the slicer selections. Then display this measure as a footer on your report.
Something like below:
(I have displayed the footer on a multi-card visual as this will always be a single value based on the selections from the slicers)
The measure that I have used is:
Conditional Title = VAR prodName = VALUES('Supermarket Sales'[Product line]) VAR occur = COUNTROWS(ALL('Supermarket Sales'[Product line])) = COUNTROWS(prodName) RETURN IF( occur, "Summary of Products", CONCATENATE("Summary of Product Line: ", CONCATENATEX( prodName, 'Supermarket Sales'[Product line], ", " ) ) )Currently, it takes into account selection from a single slicer, but this can be modified as per requirement to show selections from multiple slicers.
HI Anonymous ,
You can try creating a measure using the values concatenated from all the slicer selections. Then display this measure as a footer on your report.
Something like below:
(I have displayed the footer on a multi-card visual as this will always be a single value based on the selections from the slicers)
The measure that I have used is:
Conditional Title =
VAR prodName = VALUES('Supermarket Sales'[Product line])
VAR occur = COUNTROWS(ALL('Supermarket Sales'[Product line])) = COUNTROWS(prodName)
RETURN
IF(
occur, "Summary of Products",
CONCATENATE("Summary of Product Line: ",
CONCATENATEX(
prodName,
'Supermarket Sales'[Product line],
", "
)
)
)
Currently, it takes into account selection from a single slicer, but this can be modified as per requirement to show selections from multiple slicers.
- Anonymous4 years agoNot applicable
Thanks Pragati. I couldn't get your formula to work so started with a Quick measure and created the following.
List of TEXT_FISCAL_YEAR values =VAR __DISTINCT_VALUES_COUNT = DISTINCTCOUNT('Fiscal Calendar'[TEXT_FISCAL_YEAR])VAR __MAX_VALUES_TO_SHOW = 5RETURNIF(__DISTINCT_VALUES_COUNT > __MAX_VALUES_TO_SHOW,CONCATENATE(CONCATENATEX(TOPN(__MAX_VALUES_TO_SHOW,ALLSELECTED('Fiscal Calendar'[TEXT_FISCAL_YEAR]),'Fiscal Calendar'[TEXT_FISCAL_YEAR],ASC),'Fiscal Calendar'[TEXT_FISCAL_YEAR],", ",'Fiscal Calendar'[TEXT_FISCAL_YEAR],ASC),", etc."),CONCATENATEX(ALLSELECTED('Fiscal Calendar'[TEXT_FISCAL_YEAR]),'Fiscal Calendar'[TEXT_FISCAL_YEAR],", ",'Fiscal Calendar'[TEXT_FISCAL_YEAR],ASC))I then thought I would create another quick measure for one of the other slicers and add it to the one above. I must have pasted it in the wrong place because it didn't work. Where do i need to past it and how many of these could I nest in the above formula. It looks like you can only concatenate two values.- Pragati114 years ago
Super User
Hi Anonymous ,
You will need nested CONCATENATE statements to get multiple selections in the measure.