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.
TL;DR: Date format for Power BI integration is different while editing then while in production.
I am working on a gallery view of assignments. These assignments have an end date, that is formatted as a date in Power BI.
Power BI can show all assignments, but I want the integrated PowerApp to only show assignments that end after today. So I am writing a formula for the "Items" property in the gallery of assignments that filters the PowerBIIntegration.Data by assignment end.
You would expect this then to be the formula. I later found out that it does work only on the tile embedded in Power BI. It does not work in the live editing preview. (Where you have the Power BI Online report and PowerApps windows opened in conjunction both in edit mode)
Filter(
PowerBIIntegration.Data,
AssignmentEnd > Today()
)
The fact that the formula did not work in the live preview, led me to write this ugly formula. It works in the live preview in PowerApps Studio, but not in the actual Power BI embedded tile. The returned result is always blank. So I reverted back to the first simpler formula and tested it in production, and what do you know it works.
Filter(
PowerBIIntegration.Data,
Date(
Value(
Left(
Text(
AssignmentEnd,
DateTimeFormat.ShortDate
),
4
)
),
Value(
Right(
Left(
Text(
AssignmentEnd,
DateTimeFormat.ShortDate
),
7
),
2
)
),
Value(
Right(
Left(
Text(
AssignmentEnd,
DateTimeFormat.ShortDate
),
10
),
2
)
)
) > Today()
)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.