The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello,
Any Idea how to Show or Hide the trend line using DAX?
Hi @Tayyab
Sorry the description is not clear. Can you please provide some sample data and more details to describe the requirement? https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
If the trend line value is calculated by a measure, you can consider using ISFILTERED or SELECTEDVALUE to tell whether a slicer is picking a value. When a value is picked, the measure calculates the correct trend value. Otherwise, make the measure return blank.
Or you can try creating bookmarks for Show and Hide status separately. Then bind the bookmarks to buttons and use buttons to switch the bookmarks.
Reference:
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
@Tayyab , More information is needed. Measure slicer and calculation group can help
measure slicer
https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/50...
https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slic...
calculation groups
https://www.sqlbi.com/blog/marco/2020/07/15/creating-calculation-groups-in-power-bi-desktop/