cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mark-carlisle
Helper II
Helper II

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

Accepted Solutions

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

View solution in original post

4 REPLIES 4
Syndicate_Admin
Administrator
Administrator

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

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

View solution in original post

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,975)