Forum Discussion
Anonymous
3 years agoNot applicable
report
Hi! Please have a look at the report I have created. There are cards - name of the customer and some numbers (quantity, sales etc.) and treemap. User can choose any customer (from the treemap) to ...
- 3 years ago
Try create a measure to use in that text box instead of using an aggregation - something like:
Customer Name Text Box = IF(ISFILTERED([customer_name]), SELECTEDVALUE([customer_name]), "All Customers")
Anonymous
3 years agoNot applicable
Hi Anonymous ,
Please try below dax formula:
1. below is my test table
Table:
2. create measure with below dax formula
Choose Name =
VAR cur_name =
SELECTEDVALUE ( 'Table'[Name] )
RETURN
IF ( ISFILTERED ( 'Table'[Name] ), cur_name, "Not choose name" )
Sales =
VAR _total =
SUMX ( 'Table', [Sale] )
VAR cur_name =
SELECTEDVALUE ( 'Table'[Name] )
VAR _val =
CALCULATE ( SUM ( 'Table'[Sale] ), 'Table'[Name] = cur_name )
RETURN
IF ( ISFILTERED ( 'Table'[Name] ), _val, _total )
3. add a treemap visual with fields, add card visual with measure
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.