Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
jerryr125
Helper III
Helper III

Create Button to send a specific field-value to a sheet

Hi - 

I am looking to do the following:

 

* Create a button that will send the user to another sheet with details. 

the measure is called "kpi-store-name"

 

Note: the measure for the "kpi-store-name" is 

 

var a = SUMMARIZE(filter('tbl_abc,[OpenOrders] in {"Y"}),[StoreDesc],"ct",COUNTROWS('tbl_abc'))
return CONCATENATEX(TOPN(1,a,[ct]),[StoreDesc])
* This measure works and returns the store name with the greatest number of OpenOrders
 
I would like for the user to click the button to see the specific orders
 
Any thoughts ?
1 ACCEPTED SOLUTION
v-pgoloju
Community Support
Community Support

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

View solution in original post

12 REPLIES 12
v-pgoloju
Community Support
Community Support

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

Perfect !!! Thank you very much !

Poojara_D12
Super User
Super User

Hi @jerryr125 

To achieve this behavior in Power BI—where a user clicks a button to navigate to a details page filtered by the top "kpi-store-name"—you can use Bookmarks with Page Navigation and field parameters or sync slicers to simulate a dynamic drill-through experience. However, since DAX measures like your kpi-store-name are not directly selectable in visuals or slicers, you'll need to work around this limitation. Here’s a practical approach:

 

First, create a separate page (e.g., "Order Details") that shows the full list of orders from 'tbl_abc'. Then, create a drill-through field based on [StoreDesc] (if not already created), and place it in the drill-through section of the details page. On your main report page, instead of using a DAX measure in a button, add a transparent button over a card visual that displays the kpi-store-name measure. Users won’t click the measure directly, but rather the button over it. To make the interaction dynamic, use a SELECTEDVALUE pattern: create a slicer or visual filtered to the top store, based on your logic, and allow users to click into it, which then passes context to the drill-through.

 

Since your measure returns a single store with the highest open orders, you can create a calculated table or disconnected table that lists all stores, then create a selection-based navigation approach: when a store is selected, show the button, and clicking it navigates to the detail page. Alternatively, you can consider using Power BI's new dynamic page navigation features, where a button with a page navigation action can navigate to a drill-through page based on the context set by a slicer or card visual.

 

Unfortunately, there’s no native way to directly click a measure and pass that value dynamically to another page via a button, but combining drill-through filters, transparent buttons, and visual interactions gives a smooth user experience.

 

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

Kind Regards,
Poojara - Proud to be a Super User
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS
v-pgoloju
Community Support
Community Support

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 @v-pgoloju 

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

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

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

Hi - @v-pgoloju 

Thank you again for your help.

Ok, here is what I am trying to do.

 

Data table:

tbl_abc

 

StoreDescOrderIDOpen Orders
StoreA12Y
StoreA34Y
StoreA56N
StoreB78Y
StoreB90Y
StoreCABY
StoreDCDY
StoreEEFY
StoreEGHN

 

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 included
 
PAGE: HOME
measure:
kpi-display-card = 
tbl_abc[kpi-store-name] & "has the most open orders"
 
Displays:
StoreA, StoreB has the most open orders
 
The 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:

 

StoreDescOrderIDOpen Orders
StoreA12Y
StoreA34Y
StoreB78Y
StoreB90Y

 

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

jerryr125
Helper III
Helper III

Yes i agree - but the value in the meaure appears in a card with text and other values...

include the appropriate drillthrough fields so you can recreate (or reuse) the measure on the target page.

lbendlin
Super User
Super User

instead, use the "Drillthrough"  feature and teach your users how to use it.

Helpful resources

Announcements
Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.

"); $(".slidesjs-pagination" ).prependTo(".pagination_sec"); $(".slidesjs-pagination" ).append("
"); $(".slidesjs-play.slidesjs-navigation").appendTo(".playpause_sec"); $(".slidesjs-stop.slidesjs-navigation").appendTo(".playpause_sec"); $(".slidesjs-pagination" ).append(""); $(".slidesjs-pagination" ).append(""); } catch(e){ } /* End: This code is added by iTalent as part of iTrack COMPL-455 */ $(".slidesjs-previous.slidesjs-navigation").attr('tabindex', '0'); $(".slidesjs-next.slidesjs-navigation").attr('tabindex', '0'); /* start: This code is added by iTalent as part of iTrack 1859082 */ $('.slidesjs-play.slidesjs-navigation').attr('id','playtitle'); $('.slidesjs-stop.slidesjs-navigation').attr('id','stoptitle'); $('.slidesjs-play.slidesjs-navigation').attr('role','tab'); $('.slidesjs-stop.slidesjs-navigation').attr('role','tab'); $('.slidesjs-play.slidesjs-navigation').attr('aria-describedby','tip1'); $('.slidesjs-stop.slidesjs-navigation').attr('aria-describedby','tip2'); /* End: This code is added by iTalent as part of iTrack 1859082 */ }); $(document).ready(function() { if($("#slides .item").length < 2 ) { /* Fixing Single Slide click issue (commented following code)*/ // $(".item").css("left","0px"); $(".item.slidesjs-slide").attr('style', 'left:0px !important'); $(".slidesjs-stop.slidesjs-navigation").trigger('click'); $(".slidesjs-previous").css("display", "none"); $(".slidesjs-next").css("display", "none"); } var items_length = $(".item.slidesjs-slide").length; $(".slidesjs-pagination-item > button").attr("aria-setsize",items_length); $(".slidesjs-next, .slidesjs-pagination-item button").attr("tabindex","-1"); $(".slidesjs-pagination-item button").attr("role", "tab"); $(".slidesjs-previous").attr("tabindex","-1"); $(".slidesjs-next").attr("aria-hidden","true"); $(".slidesjs-previous").attr("aria-hidden","true"); $(".slidesjs-next").attr("aria-label","Next"); $(".slidesjs-previous").attr("aria-label","Previous"); //$(".slidesjs-stop.slidesjs-navigation").attr("role","button"); //$(".slidesjs-play.slidesjs-navigation").attr("role","button"); $(".slidesjs-pagination").attr("role","tablist").attr("aria-busy","true"); $("li.slidesjs-pagination-item").attr("role","list"); $(".item.slidesjs-slide").attr("tabindex","-1"); $(".item.slidesjs-slide").attr("aria-label","item"); /*$(".slidesjs-stop.slidesjs-navigation").on('click', function() { var itemNumber = parseInt($('.slidesjs-pagination-item > a.active').attr('data-slidesjs-item')); $($('.item.slidesjs-slide')[itemNumber]).find('.c-call-to-action').attr('tabindex', '0'); });*/ $(".slidesjs-stop.slidesjs-navigation, .slidesjs-pagination-item > button").on('click keydown', function() { $.each($('.item.slidesjs-slide'),function(i,el){ $(el).find('.c-call-to-action').attr('tabindex', '-1'); }); var itemNumber = parseInt($('.slidesjs-pagination-item > button.active').attr('data-slidesjs-item')); $($('.item.slidesjs-slide')[itemNumber]).find('.c-call-to-action').attr('tabindex', '0'); }); $(".slidesjs-play.slidesjs-navigation").on('click', function() { $.each($('.item.slidesjs-slide'),function(i,el){ $(el).find('.c-call-to-action').attr('tabindex', '-1'); }); }); $(".slidesjs-pagination-item button").keyup(function(e){ var keyCode = e.keyCode || e.which; if (keyCode == 9) { e.preventDefault(); $(".slidesjs-stop.slidesjs-navigation").trigger('click').blur(); $("button.active").focus(); } }); $(".slidesjs-play").on("click",function (event) { if (event.handleObj.type === "click") { $(".slidesjs-stop").focus(); } else if(event.handleObj.type === "keydown"){ if (event.which === 13 && $(event.target).hasClass("slidesjs-play")) { $(".slidesjs-stop").focus(); } } }); $(".slidesjs-stop").on("click",function (event) { if (event.handleObj.type === "click") { $(".slidesjs-play").focus(); } else if(event.handleObj.type === "keydown"){ if (event.which === 13 && $(event.target).hasClass("slidesjs-stop")) { $(".slidesjs-play").focus(); } } }); $(".slidesjs-pagination-item").keydown(function(e){ switch (e.which){ case 37: //left arrow key $(".slidesjs-previous.slidesjs-navigation").trigger('click'); e.preventDefault(); break; case 39: //right arrow key $(".slidesjs-next.slidesjs-navigation").trigger('click'); e.preventDefault(); break; default: return; } $(".slidesjs-pagination-item button.active").focus(); }); }); // Start This code is added by iTalent as part of iTrack 1859082 $(document).ready(function(){ $("#tip1").attr("aria-hidden","true").addClass("hidden"); $("#tip2").attr("aria-hidden","true").addClass("hidden"); $(".slidesjs-stop.slidesjs-navigation, .slidesjs-play.slidesjs-navigation").attr('title', ''); $("a#playtitle").focus(function(){ $("#tip1").attr("aria-hidden","false").removeClass("hidden"); }); $("a#playtitle").mouseover(function(){ $("#tip1").attr("aria-hidden","false").removeClass("hidden"); }); $("a#playtitle").blur(function(){ $("#tip1").attr("aria-hidden","true").addClass("hidden"); }); $("a#playtitle").mouseleave(function(){ $("#tip1").attr("aria-hidden","true").addClass("hidden"); }); $("a#play").keydown(function(ev){ if (ev.which ==27) { $("#tip1").attr("aria-hidden","true").addClass("hidden"); ev.preventDefault(); return false; } }); $("a#stoptitle").focus(function(){ $("#tip2").attr("aria-hidden","false").removeClass("hidden"); }); $("a#stoptitle").mouseover(function(){ $("#tip2").attr("aria-hidden","false").removeClass("hidden"); }); $("a#stoptitle").blur(function(){ $("#tip2").attr("aria-hidden","true").addClass("hidden"); }); $("a#stoptitle").mouseleave(function(){ $("#tip2").attr("aria-hidden","true").addClass("hidden"); }); $("a#stoptitle").keydown(function(ev){ if (ev.which ==27) { $("#tip2").attr("aria-hidden","true").addClass("hidden"); ev.preventDefault(); return false; } }); }); // End This code is added by iTalent as part of iTrack 1859082
Top Solution Authors
Top Kudoed Authors