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 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
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 agoHelper 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
- jerryr1251 year agoHelper IV
Hi - Anonymous
Thank you again for your help.
Ok, here is what I am trying to do.
Data table:
tbl_abc
StoreDesc OrderID Open Orders StoreA 12 Y StoreA 34 Y StoreA 56 N StoreB 78 Y StoreB 90 Y StoreC AB Y StoreD CD Y StoreE EF Y StoreE GH N measure:
kpi-store-name =
var a = SUMMARIZE(filter('tbl_abc,[OpenOrders] in {"Y"}),[StoreDesc],"ct",COUNTROWS('tbl_abc'))return CONCATENATEX(TOPN(1,a,[ct]),[StoreDesc])kpi-store-name results in StoreA, StoreB since both stores have two open orders (the "N" are not includedPAGE: HOMEmeasure:kpi-display-card =tbl_abc[kpi-store-name] & "has the most open orders"Displays:StoreA, StoreB has the most open ordersThe kpi-display card measure appears in a card visualization on the home page.I added an invisible box on the homepage. When the end-user clicks on the card I would like them to go to a page "store-open-orders". The "store-open-orders" page displays a table visualization. The table visualization has the following:PAGE: store-open-orders
table visualization:
StoreDesc OrderID Open Orders StoreA 12 Y StoreA 34 Y StoreB 78 Y StoreB 90 Y So I basically would like to connect the visible button from the home page to the store-open-orders page. The store-open-orders page would filter on the values in the measure "kpi-store-name".'
I think we are close - just need to connect and filter - Jerry