Skip to main content
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
PopoLolo
New Contributor

Display cumulative rows in a table when clicking on a cumulative chart

Hello,

I need help creating an interaction between a chart and a table in Power BI.

Context:

  • I have a stacked bar chart displaying monthly cumulative IDTs (for example: January = 2 IDTs, February = 5 cumulative IDTs since January, March = 8 cumulative IDTs since January, etc.)
  • Below it, I have a table listing IDT details with their information (Interface Reference, Phase, Owner Entity, etc.)
  • Both visuals are linked through a calendar date table DIM_Date which is connected to my fact table  via the date field

Current issue: When I click on September in the chart, the table only displays IDTs from September (default Power BI behavior).

Desired result: I would like the table to display all IDTs from January to September (cumulative) when I click on September, and similarly for all other months.

What I've tried:

  • Modifying interactions between visuals (but it doesn't change the behavior)
  • Creating filter measures, but I get context errors

Question: How can I make the table display cumulative rows up to the selected month in the chart?

Thanks in advance for your help!

1 ACCEPTED SOLUTION
tayloramy
Contributor

Hi @PopoLolo,

 

Youโ€™re running into the default cross-highlight behavior: when you click September, the chart filters the model to only September, so the table canโ€™t โ€œseeโ€ January-August anymore. To get cumulative rows, you need to (1) stop the chart from filtering the table and (2) read the selected month from a disconnected date axis, then (3) apply your own โ€œโ‰ค selected monthโ€ logic to the table.

 

This is untested, but is how I would approach this. If you share a sample file with data I can make modifications to it for you to achieve the desired result. 

 

  • Create a disconnected date axis (no relationships):
DateAxis =
ADDCOLUMNS (
    CALENDAR ( DATE(2025,1,1), DATE(2025,12,31) ),
    "YearMonth", FORMAT ( [Date], "YYYY-MM" )
)
  • Use that DateAxis on your stacked bar chart axis.
  • Turn off the chart > table interaction (Format pane > Edit interactions > set the table to โ€œNoneโ€).
  • Add a measure the table can use to include rows up to the selected month:
Selected Max Date =
VAR selMax =
    MAX ( DateAxis[Date] )   -- comes from the disconnected axis
RETURN
IF ( ISBLANK ( selMax ), BLANK (), selMax )
Show Up To Selection? =
VAR sel = [Selected Max Date]
VAR rowDate = SELECTEDVALUE ( DIM_Date[Date] )
RETURN
IF (
    ISBLANK ( sel )
        || ( NOT ISBLANK ( rowDate ) && rowDate <= sel && YEAR ( rowDate ) = YEAR ( sel ) ),
    1, 0
)
  • Put Show Up To Selection? in the tableโ€™s Visual-level filters = 1.
    Now when you click September in the chart, the table ignores the chartโ€™s filter but still reads the selection and shows Januaryโ€“September rows.


If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.

View solution in original post

1 REPLY 1
tayloramy
Contributor

Hi @PopoLolo,

 

Youโ€™re running into the default cross-highlight behavior: when you click September, the chart filters the model to only September, so the table canโ€™t โ€œseeโ€ January-August anymore. To get cumulative rows, you need to (1) stop the chart from filtering the table and (2) read the selected month from a disconnected date axis, then (3) apply your own โ€œโ‰ค selected monthโ€ logic to the table.

 

This is untested, but is how I would approach this. If you share a sample file with data I can make modifications to it for you to achieve the desired result. 

 

  • Create a disconnected date axis (no relationships):
DateAxis =
ADDCOLUMNS (
    CALENDAR ( DATE(2025,1,1), DATE(2025,12,31) ),
    "YearMonth", FORMAT ( [Date], "YYYY-MM" )
)
  • Use that DateAxis on your stacked bar chart axis.
  • Turn off the chart > table interaction (Format pane > Edit interactions > set the table to โ€œNoneโ€).
  • Add a measure the table can use to include rows up to the selected month:
Selected Max Date =
VAR selMax =
    MAX ( DateAxis[Date] )   -- comes from the disconnected axis
RETURN
IF ( ISBLANK ( selMax ), BLANK (), selMax )
Show Up To Selection? =
VAR sel = [Selected Max Date]
VAR rowDate = SELECTEDVALUE ( DIM_Date[Date] )
RETURN
IF (
    ISBLANK ( sel )
        || ( NOT ISBLANK ( rowDate ) && rowDate <= sel && YEAR ( rowDate ) = YEAR ( sel ) ),
    1, 0
)
  • Put Show Up To Selection? in the tableโ€™s Visual-level filters = 1.
    Now when you click September in the chart, the table ignores the chartโ€™s filter but still reads the selection and shows Januaryโ€“September rows.


If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.

Helpful resources

Announcements
Users online (27)