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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
ValeriaBreve
Post Partisan
Post Partisan

Determine if a record is cross-filtered

Hello,

I have a report with a table and a PowerApps integrated using the PowerBI.Integration feature.

I am trying to determine when 1 record - and 1 only -  is selected in the table to handle it in PowerApps, so that I only show data when the record is selected (otherwise it will return the first available record, so it's confusing for users).

But evidently I am not getting there...

 

My table has a column "Delivery Note" which is the one that I need to check whether selected.

The PowerApp visual also has the very same field in the data, so using a measure like "HASONEVALUE(Table[Delivery Note])" will not work when put in the powerApps datafields because of the row contest - every single row of the PowerApps data does have a single delivery note.

 

What is the correct approach to follow? How can I determine if a record is crossfiltered from the table when my PowerApps dataset does have the same data field?

 

Thanks a lot for your help!

Kind regards

Valeria

1 ACCEPTED SOLUTION
Kedar_Pande
Super User
Super User

IsSingleSelected =
VAR SelectedNotes = ALLSELECTED(Table[Delivery Note])
RETURN
IF(COUNTROWS(SelectedNotes) = 1, 1, 0)

 

Add this measure to your Power Apps data fields. It returns 1 when exactly one delivery note is selected in the table visual, regardless of row context.

 

If this answer helped, please click Kudos or mark as Solution.
-Kedar
LinkedIn: https://www.linkedin.com/in/kedar-pande

View solution in original post

4 REPLIES 4
Kedar_Pande
Super User
Super User

IsSingleSelected =
VAR SelectedNotes = ALLSELECTED(Table[Delivery Note])
RETURN
IF(COUNTROWS(SelectedNotes) = 1, 1, 0)

 

Add this measure to your Power Apps data fields. It returns 1 when exactly one delivery note is selected in the table visual, regardless of row context.

 

If this answer helped, please click Kudos or mark as Solution.
-Kedar
LinkedIn: https://www.linkedin.com/in/kedar-pande

@Kedar_Pande thank you! I has overseen the "ALLSELECTED" DAX function. This is beautifully simple and works very well 🙂 I will check the doc for AllSelected 😉 

bhanu_gautam
Super User
Super User

@ValeriaBreve You are correct that using HASONEVALUE(Table[Delivery Note]) inside the PowerApps datafields won't work as expected, because each row in the data context will always have a single value for "Delivery Note"—so the measure will always return TRUE for each row, regardless of the user's selection in the table.

 

Create a measure in Power BI that checks if exactly one "Delivery Note" is selected in the current filter context:

DAX
IsSingleDeliveryNoteSelected =
IF(
HASONEVALUE('Table'[Delivery Note]),
1,
0
)

 

Add this measure as a field to the PowerApps visual (as one of the data fields you pass in). In PowerApps, you will receive this value for every row, but you only need to check the value from the first row (since it will be the same for all rows in the current filter context).

 

In PowerApps, you can check the value of this measure (e.g., IsSingleDeliveryNoteSelected) to determine if you should display the data or not. For example, you might use:

PowerApps
If(
First(PowerBIIntegration.Data).IsSingleDeliveryNoteSelected = 1,
// Show data
// ... your logic here ...
,
// Show a message or hide data
// ... your logic here ...
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






@bhanu_gautam thank you! I have tried it however this is not working for me... because even on First(PowerBIIntegration.Data).IsSingleDeliveryNoteSelected the result of the measure is still 1 even when nothing is selected, as every row is getting that result from the Delivery Note being actually filtered in the row context.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.