Forum Discussion
Button to adapt visuals according to date type
- 2 years ago
You don't need buttons for that. Read about USERELATIONSHIP and the options to switch between active and inactive relationships from your Calendar table to your fact table.
- Anonymous2 years ago
Hi Kadd
lbendlin has pointed out the correct direction. First please read a blog (Using USERELATIONSHIP in DAX - SQLBI) to learn about how to use the USERELATIONSHIP function in DAX. Then you can follow the steps below:
1. You can link the calendar table to the SP table on "Created" column and make it active. Then link the calendar table to the SP table on "Modified" and make it inactive.
2. Then create two measures to calculate the number of items, one is a simple measure which will calculate the number of created items. The other measure uses USERELATIONSHIP function to activate the inactive relationship to calculate the number of modified items.
3. Use a field parameter and add above two measures to it. Use the generated slicer to switch between the calculatations in the visual. Let report readers use field parameters to change visuals (preview) - Power BI | Microsoft Learn
4. If you don't want to use field parameter in step 3, you can use bookmarks and buttons to switch between visuals. Toggle Between Charts in Power BI - Microsoft Fabric Community
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
You don't need buttons for that. Read about USERELATIONSHIP and the options to switch between active and inactive relationships from your Calendar table to your fact table.