Forum Discussion
Create Button to send a specific field-value to a sheet
- Anonymous1 year ago
Hi jerryr125,
Thanks for giving detailed information on the requirement.I have created a calculated table using DAX as shown below:
TopOpenStores =
VAR a =
SUMMARIZE(
FILTER('tbl_abc', 'tbl_abc'[Open Orders] = "Y"),
[StoreDesc],
"ct", COUNTROWS('tbl_abc')
)
VAR maxCt = MAXX(a, [ct])
RETURN
FILTER(a, [ct] = maxCt)
On the Details Page, I have placed two columns for visualization.
On the Main Page, a button has been added and configured to navigate to the Details Page.I have reproduced the scenario as per the requirement and attached the .pbix file for your reference.
If the issue still persists, please feel free to reach out — we’re here to help.
Thank you & Regards,
Prasanna Kumar
Hi jerryr125,
Thank you for reaching out to the Microsoft Fabric Forum Community.
First, insert a button by going to the Insert tab and selecting Button. You can choose a blank button or one with text, such as "View Orders". Place the button on your report canvas. Then, in the Visualizations pane, enable the Action toggle and set the Type to Page navigation, selecting the target page where the order details will be shown.
To pass the selected store name (the one with the highest number of open orders) to the detail page, you can use Bookmarks and Selections to maintain context between pages. You might also use Sync Slicers to filter the data on the detail page according to the selected store.
On the detail page, create a dynamic filter by creating a measure that retrieves the selected store name:
SelectedStoreName = SELECTEDVALUE('tbl_abc'[StoreDesc])
Then, create another measure to filter the orders for the selected store:
FilteredOrders =
CALCULATE(
COUNTROWS('tbl_abc'),
'tbl_abc'[StoreDesc] = [SelectedStoreName]
)
This ensures that the orders page will display only the orders associated with the selected store.
Optionally, you can customize the button's text by using a measure that dynamically changes based on the selected store name. For example, use the following .
ButtonText = "View Orders for " & [kpi-store-name]
This will update the button text to reflect the store that the user can click to view the associated orders.
If you find this response helpful, please consider marking it as the accepted solution and giving it a thumbs-up to support others in the community.
Thank you & Regards,
Prasanna kumar
Hi Anonymous
Thank you for the response. I believe this is getting close.
1. I created the measure - no issues:
SelectedStoreName = SELECTEDVALUE('tbl_abc'[StoreDesc])
2. This measure is giving me an error message
FilteredOrders =
CALCULATE(
COUNTROWS('tbl_abc'),
'tbl_abc'[StoreDesc] = [SelectedStoreName]
)
"A function PLACEHOLDER has been used in a True/False expression that is used as a table filter expression. This is not allowed."
3. On the main page - the button I created to navigation to the Orders Page, I selected for the action type "Page Navigation" and then the Destination "Orders" page, do I need to set anything else ?
4. On the orders page, do I need to set anything in the drill-through section or filters section?
Any assistance is appreciated. Thanks - Jerry
- Anonymous1 year agoNot applicable
Hi jerryr125,
Thank you for reaching out to the Microsoft Fabric Forum Community.
to filter the order records based on this selected store, define another measure that counts the rows in the 'tbl_abc' table where the store matches the selected one. You can’t use this directly inside CALCULATE like that. Instead, wrap it with a FILTER function.
FilteredOrders =
CALCULATE(
COUNTROWS('tbl_abc'),
FILTER('tbl_abc', 'tbl_abc'[StoreDesc] = [SelectedStoreName])
)
Do Not use Drill-through if you're using Page Navigation + Sync slicers, then drill-through is not needed.Sync slicers: If you’re using a slicer to pick the store on the main page, go to the slicer settings and sync it with the Orders page:
Select the slicer > go to View > Sync slicers
Check the checkbox for the Orders page.
Page Filters / Visual-level filters:
You don’t need to manually add filters if you're using the synced slicer or the SelectedStoreName measure in visual filters.
Best regards,
Prasanna Kumar- jerryr1251 year ago
Helper IV
Hi - I think we are getting very close.
All of the measure work.
kpi-store-name =
var a = SUMMARIZE(filter('tbl_abc,[OpenOrders] in {"Y"}),[StoreDesc],"ct",COUNTROWS('tbl_abc'))return CONCATENATEX(TOPN(1,a,[ct]),[StoreDesc])FilteredOrders =
CALCULATE(
COUNTROWS('tbl_abc'),
FILTER('tbl_abc', 'tbl_abc'[StoreDesc] = [SelectedStoreName])
)SelectedStoreName = SELECTEDVALUE('tbl_abc'[StoreDesc])I have a button that goes from the home to the OpenOrders page.
What is the action do I need to set for the OpenOrders Page ?
Do I need to set a Drillthrough or Filter on the OpenOrders Page?
THere is no slicer/sync slicer for these measures.
Thoughts ? Jerry
- Anonymous1 year agoNot applicable
Hi jerryr125,
Could you please share a few screenshots of your setup—particularly the button settings, the OpenOrders page, and any relevant filters or visuals? Kindly blur or mask any secured or sensitive data fields. This will help me better understand your scenario and provide a more accurate resolution. Additionally, a clear explanation of your requirements, along with any expected output, would be greatly appreciated to ensure an accurate and efficient response.
Thanks & Regards,
Prasanna kumar