Forum Discussion
SMITHY10283
3 years agoRegular Visitor
Dynamically update chart based on data available
I have a bar chart in power bi that shows me data from January 2022 to June 2023. The X-axis shows Month/Year, so essentially monthly values from Jan 2022 to June 2023. I want to ensure that based on...
- Anonymous3 years ago
Hi SMITHY10283 ,
You can create a measure and add this measure into visual level filter.
Flag = VAR _RANGESTART = EOMONTH ( TODAY (), -13 ) + 1 VAR _RANGEEND = EOMONTH ( TODAY (), 0 ) RETURN IF ( MAX ( 'TableName'[Date] ) >= _RANGESTART && MAX ( 'TableName'[Date] ) <= _RANGEEND, 1, 0 )Add this measure into the visual level filter and set it to show items when value =1.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
lbendlin
3 years agoSuper User
You can use a calculated column. It will be calculated every time the dataset refreshes. Set it to 1 if the date is within the last 12 months, and to 0 if not. Use that calculated column as a filter for the visual, the page, or the entire report.