Forum Discussion
Stacked Column Chart Linked to Card
HI Rees ,
Actually, the highlight effect is similar to normal filter, you can use dax functions(allselected/values, min/max) to get current selection.
Sample title measure:
title measure =
IF (
COUNTROWS ( VALUES ( 'Table'[Date] ) ) > 1,
MIN ( 'Table'[Date] ) & " - "
& MAX ( 'Table'[Date] ) & " sales",
MIN ( 'Table'[Date] ) & " sales"
)
Regards,
Xiaoxin Sheng
Hi, I must be doing something differently than you. Your example clearly shows this working. I have the following DAX expression defined:
The value displayed on the card does change appropriately as I click on and off of different columns in the stacked chart. It's just the title that I cannot yet change dynamically. It's strange because I can clearly see your example is working, and it is using COUNTROWS
- Anonymous6 years agoNot applicable
HI Rees ,
I found your date values are stored in text type, some of DAX functions can't work properly with text values. (min/max works on numeric or date type)
Please modify your filed type to 'date', then my measure formula can extract corresponding values.Regards,
Xiaoxin Sheng
- Rees6 years agoFrequent Visitor
Unfortunately that solution does not work. I am simplifying the issue in order to help eliminate possible causes.
The following DAX expression results in "A + B" all the time, even when one column is clicked on (focused/selected).
IF ( COUNTROWS ( VALUES ( 'MAU Rollups'[YearMonthDisplay] ) ) > 1, "A + B" , "JUST ONE" )
This matches what I found earlier, that no matter if one column is selected, or not, COUNTROWS always returns 13 (the number of columns). In your example, unless I'm missing it, your COUNTROWS statement returns different values when a single column is clicked on
I think the problem may be the can the problem be the data model? It is a direct query, that always returns 13 records?