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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mark_carlisle
Advocate IV
Advocate IV

Power BI PowerApps visual issue filtering a measure with a slicer

I currently have a Power BI report that has a PowerApps visual in it. The purpose of the report is to show agents there customer survey results, sometimes these surveys are about other agents involved in resolving the customer issue or more about the process, product or company and there is therefore a need to remove these from the agent and reassign to another agent or removed altogether.

 

The app built into the report displays some details on the survey and then allows the agent to dispute the survey if they feel it is not related to them. The idea being that it reduces the potential for typos and allows validation of data before it is written to a database allowing the process to be vastly simplified.

 

Currently it looks like this;

 

 

Capture1.png

 

 

The PowerApps visual is highlighted by the red box. The Survey Number slicer is just a slicer visual in Power BI. Under the inTouch Call Comments heading the wording Please select a Survey Number to view comments, when a survey number is selected in the slicer the app displays specifics on the survey as show below;

 

 

Capture2.png

 

This is acheived with a measure in Power BI

 

PowerAppsCommentText =
IF (
ISFILTERED ( Surveys[SurveyID] ),
FIRSTNONBLANK ( Surveys[CommentText], 1 ),
"Please select a Survey Number to view comments"
)

On the PowerApps side of things the Text property of the Label is;

 

First(PowerBIIntegration.Data).PowerAppsCommentText

 

That's the background out of the way.

 

I'm in the process of redesigning the report and associated apps and I want to make the wording Please select a Survey Number to view comments much clearer. Essentially I want to hide all the headings displaying an information icon and wording centrally. 

 

So easy right? Just pass a 1 (filtered) or 0 (unfiltered) to PowerApps and then have parts of the interface either visible or not based on that number. So in Power BI I have a measure;

 

PowerAppsFilter = 
IF ( ISFILTERED ( Surveys[SurveyID] ), 1, 0 )

And on the PowerApps side in the Visible property of the data and heading fields;

 

If(First(PowerBIIntegration.Data).PowerAppsFilter = 1, true, false)

And on the information icon and wording;

 

If(First(PowerBIIntegration.Data).PowerAppsFilter = 0, true, false)

However, what happens is that the measure always shows as 1 in PowerApps, regardless if the Survey ID is filtered in Power BI or not. This results in the headings and data fields always showing, screenshots follow with the PowerApps visual highlighted in red again.

Capture3.PNG

 

Capture4.PNG

 

 

 

 

Now its not a big deal I can leave the app the way it is and everything will work fine but I'm stubborn and want to know why what I am doing isn't working, especially given what I've done previously at least to me appears to be the same.

 

Any suggestions?

1 ACCEPTED SOLUTION

Hi @mark_carlisle,

 

I don't know what you are going to achieve. But I found we should adjust the formula in PowerApps. I added a default value with a formula. So it would react to the selections in the Power BI. Please refer to the formula and the snapshot below.

If(IsBlank(First(PowerBIIntegration.Data).PowerAppsFilter), false, true)

Power-BI-Power-Apps-visual-issue-filtering-a-measure-with-a-slicer2Power-BI-Power-Apps-visual-issue-filtering-a-measure-with-a-slicer3

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-jiascu-msft
Employee
Employee

Hi @mark_carlisle,

 

Can you share the details on how you created the PowerApp visual? Please refer to the snapshot below. At least it worked. 

Power_BI_Power_Apps_visual_issue_filtering_a_measure_with_a_slicer

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I created an app in PowerApps and then within the Power BI report added the visual and selected Existing app option rather than the create app.

 

I take it if you deselect everything in the filter false changes to true?

 

Would you be able to describe what you have done and I will follow to recreate your success on my end.

Hi @mark_carlisle,

 

I don't know what you are going to achieve. But I found we should adjust the formula in PowerApps. I added a default value with a formula. So it would react to the selections in the Power BI. Please refer to the formula and the snapshot below.

If(IsBlank(First(PowerBIIntegration.Data).PowerAppsFilter), false, true)

Power-BI-Power-Apps-visual-issue-filtering-a-measure-with-a-slicer2Power-BI-Power-Apps-visual-issue-filtering-a-measure-with-a-slicer3

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

That's working. This is what I was looking to achieve, compared to the first screenshot in the opening post this is a much clearer call to action for the user.

 

1.png

 

2.PNG

 

Thanks for your help on this.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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