Forum Discussion

NightSpeedOne's avatar
NightSpeedOne
New Member
1 year ago
Solved

Power BI

I am trying to use a value passed from Power BI to Power Apps and based on that value navigate to the correct screen. The issue is that, even though I can see the value and display it with a Notify without the navigate, as soon as I add the Navigate(), I lose the value. I also tried the StartScreen.

###OnStart

Set(varPBIScreenId,
    If(
            IsBlank(
                    Text(First([@@PowerBIIntegratio].Data).Screen)
                    ),
                    "0",
                    Text(First([@PowerBIIntegration].Data).Screen)
    )
);
If(
    varPBIScreenId = "1",
    Navigate(PAM_Profile_User),
    varPBIScreenId = "2",
    Navigate(PAM_Absence_Patch),
    varPBIScreenId = "3",
    Navigate(PAM_Profile_SideList),
    Navigate(PAM_Absence_Patch)
);
 
#### StartScreen
If(
Value(First([@PowerBIIntegration].Data).Screen) = 1,
PAM_Profile_User,
Value(First([@PowerBIIntegration].Data).Screen) = 2,
PAM_Absence_Patch,
Value(First([@PowerBIIntegration].Data).Screen) = 3,
PAM_Profile_SideList,
PAM_Profile_SideList
)
  • So you got me thinking about delay, while seaching and not finding a delay function I did find timer and it has auto start and onend. So I moved the timer to a splash screen and set it for 1 second and then added the navigate to the onend. Works perfect.

5 Replies

  • a value passed from Power BI to Power Apps

    How are you passing that value?  Via the PowerApps visual?

    • NightSpeedOne's avatar
      NightSpeedOne
      New Member

      Using the Power BI intergrated visual for Power Apps, insert the visual and then navigate to the power apps and edit the power apps, which creates the PowerBIIntegration object. I can use the value in a page and use notify to display it. As soon as I add Naigate to the OnStart the same Notify (Before the Navigate) is blank.

       

       

      • lbendlin's avatar
        lbendlin
        Super User

        Maybe OnStart is too soon.  See if you can use a different event, or a delay.