The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
Hope you're all doing good.
I'm not used to Power BI and have to create a report based on an sharepoint list.
What i'm trying to do is having a button that will allow my visuals to switch according to column "Created" or "Modified" . so for example, i have a table containing a calendar, this table would be linked to my SharePoint list table. Then on the report, i have a slicer for the calendar and a chart that contains the number of items .... when i select a date and hit the "Modified" button, the chart should show me the number of modified items for the selected date. and when i select the button "Created" , it should show me the number of created items for the selected date.
it might be very simple but i'm not sure how i can link one single calendar table to 2 date values in the SP table to make this happen and then have the buttons working with this.
Hope it's clear enough and someone will be able to help me.
Thanks a lot for your time
Solved! Go to Solution.
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.
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!
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.