Forum Discussion
Disable specific filter on tooltip chart
- Anonymous4 years ago
Hi harshadrokade,
I think you need to change your tooltip report page DAX expression to add 'all' functions to ignore the current filter and add variables to store and calculate the previous date period.
Managing “all” functions in DAX: ALL, ALLSELECTED, ALLNOBLANKROW, ALLEXCEPT - SQLBI
Then you can use this variable as a condition to calculate corresponding results.
formual = VAR currDate = MAX ( Table[Date] ) VAR prevDate = DATE ( YEAR ( currDate ) - 1, MONTH ( currDate ), DAY ( currDate ) ) RETURN CALCULATE ( SUM ( Table[Value] ), FILTER ( ALL ( Table ), [Date] = prevDate ), VALUES ( Table[Student name] ), VALUES ( Table[Subject name] ) )Regards,
Xiaoxin Sheng
Hi Anonymous
I have created a tooltip chart as below where I have added a filter that filters the chart by showing latest 2 dates on X axis. I want to show this chart on card visual (Shown below) when I hover on a specific card from the multi card. The issue is when I hover on the card, it shows me only latest year on tooltip bar chart. It may be because the card visual also has a filter applied as mentioned below-
Sample dummy data-
| Month-DD/MM/YYYY | Value | Student name | Subject name |
| 01-01-2020 | 100 | A | ABC1 |
| 01-03-2020 | 80 | A | ABC1 |
| 01-08-2020 | 90 | A | ABC1 |
| 01-12-2020 | 70 | A | ABC1 |
| 01-01-2020 | 70 | A | ABC2 |
| 01-03-2020 | 80 | A | ABC2 |
| 01-08-2020 | 90 | A | ABC2 |
| 01-12-2020 | 100 | A | ABC2 |
| 01-01-2020 | 10 | B | ABC1 |
| 01-03-2020 | 100 | B | ABC1 |
| 01-08-2020 | 70 | B | ABC1 |
| 01-12-2020 | 40 | B | ABC1 |
| 01-01-2020 | 30 | B | ABC2 |
| 01-03-2020 | 80 | B | ABC2 |
| 01-08-2020 | 30 | B | ABC2 |
| 01-12-2020 | 10 | B | ABC2 |
| 01-01-2020 | 40 | A | ABC3 |
| 01-03-2020 | 30 | A | ABC3 |
| 01-08-2020 | 80 | A | ABC3 |
| 01-12-2020 | 100 | A | ABC3 |
| 01-01-2020 | 10 | B | ABC3 |
| 01-03-2020 | 100 | B | ABC3 |
| 01-08-2020 | 70 | B | ABC3 |
| 01-12-2020 | 40 | B | ABC3 |
| 01-01-2020 | 40 | A | ABC4 |
| 01-03-2020 | 30 | A | ABC4 |
| 01-08-2020 | 80 | A | ABC4 |
| 01-12-2020 | 100 | A | ABC4 |
| 01-01-2020 | 10 | B | ABC4 |
| 01-03-2020 | 100 | B | ABC4 |
| 01-08-2020 | 70 | B | ABC4 |
| 01-12-2020 | 40 | B | ABC4 |
Multi card visual with filter aplied to show only latest year data. So when you hover on latest card of a specific Subject (filtered on latest month), you should be able to see last two period bar chart created on tooltip chart tab.
As of now it shows the column chart of only latest year as below. I want to see previous year comparison on column chart for the selected student & subject on which hover is done.
Hi harshadrokade,
I think you need to change your tooltip report page DAX expression to add 'all' functions to ignore the current filter and add variables to store and calculate the previous date period.
Managing “all” functions in DAX: ALL, ALLSELECTED, ALLNOBLANKROW, ALLEXCEPT - SQLBI
Then you can use this variable as a condition to calculate corresponding results.
formual =
VAR currDate =
MAX ( Table[Date] )
VAR prevDate =
DATE ( YEAR ( currDate ) - 1, MONTH ( currDate ), DAY ( currDate ) )
RETURN
CALCULATE (
SUM ( Table[Value] ),
FILTER ( ALL ( Table ), [Date] = prevDate ),
VALUES ( Table[Student name] ),
VALUES ( Table[Subject name] )
)
Regards,
Xiaoxin Sheng