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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
aaa12
Helper II
Helper II

Getting Date Error in PowerBIIntegration

Hello,

I embeded a PowerApp in my PowerBI dashboard. I am receiving the following error.

aaa12_0-1726174389523.png

 

This only happens when there are null values in the Due_Date field. I tried creating another column where Due_Date was converted into Text to get past the date format issue but I still get the same error.

 

Next I attempted to add a condition to check for blank values and changed this code:

 

 

xAppFlow.Run(
    JSON(
       [@PowerBIIntegration].Data,
        JSONFormat.IncludeBinaryData
    )
);
    Notify(
        "Your request has been submitted",
        NotificationType.Success,
        5000
    );
    Reset(Comments);
    Reset('Request Type');

 

 

to this code...

 

ClearCollect(
    ProcessedData,
    ForAll(
        [@PowerBIIntegration].Data,
        {
            'ID': 'ID',
            'Operating System': 'Operating System',
            V_id: v_id,
            'Created at': 'Created at',
            'Due Date': If(IsBlank('Due Date'), DateValue(" "), 'Due Date')
        }
    )
);

// Run the Power Automate flow with the processed data
xAppFlow.Run(
    JSON(
        ProcessedData,
        JSONFormat.IncludeBinaryData
    )
);
    Notify(
        "Your request has been submitted",
        NotificationType.Success,
        5000
    );
    Reset(Comments);
    Reset('Request Type');

 

 

I tried the above code by leaving the blank values as " " or by changing them to "1/1/9999" but none of my attempts worked. Asking the community for ideas to get past this error.
Note: All of these codes work when Due_Date values are not NULL.

1 ACCEPTED SOLUTION
aaa12
Helper II
Helper II

I was able to resovle this. As inelegant as it is, I'm sharing the solution in case it helps others. 

 

Basically, I created a measure to handle blank values and passed it through to power apps and it worked.

 

m_DueDateText = 
VAR DueDateValue = MAX(dashboard[due_date])
RETURN
    IF (
        ISBLANK(DueDateValue),
        "",
        FORMAT(DueDateValue, "YYYY-MM-DD")
    )

 

 

View solution in original post

3 REPLIES 3
aaa12
Helper II
Helper II

I was able to resovle this. As inelegant as it is, I'm sharing the solution in case it helps others. 

 

Basically, I created a measure to handle blank values and passed it through to power apps and it worked.

 

m_DueDateText = 
VAR DueDateValue = MAX(dashboard[due_date])
RETURN
    IF (
        ISBLANK(DueDateValue),
        "",
        FORMAT(DueDateValue, "YYYY-MM-DD")
    )

 

 

v-stephen-msft
Community Support
Community Support

Hi @aaa12 ,

 

Thanks for reaching out to this forum.

Did you get this error when you opened the dashboard on Power BI mobile apps? Is there an attempt to open it in Power BI Desktop or Power BI Service?

 

Best Regards,

Stephen Tao

 

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

 

hey stephen - yes, I get the error when I am in Power BI and launch Power Apps and submit data/request. I get the same error whether I open it in Power BI Desktop or PowerBI Services.

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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

Top Solution Authors