Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi all
I'm working on a paginated reports and I have 2 questions regarding the report builder:
=sum(iif(Fields!Year.Value=TODAY.Year AND Fields!CalendarWeek.Value=Parameters!WeeklyVolumeDataCalendarWeek.Value(0)-1,
Fields!Total_Volume.Value,Nothing))
Solved! Go to Solution.
Hi, @amgarav
When using Power BI datasets in paginated reports, it's important to understand that paginated reports don't directly support DAX measures in Power BI models. Instead, you'll need to use SQL queries or expressions to recreate the logic for these measures in a paginated report. This may involve getting the raw data through a query and then applying the necessary calculations in the report itself. For more information about connecting to Power BI datasets and limitations, you can check the following link:
Supported data sources for Power BI paginated reports - Power BI | Microsoft Learn
Regarding your expression issues, it seems likely that there may be spelling mistakes or logical errors in your expressions, especially in the way you handle day and week calculations. The corrected expression might look like this:
=Sum(IIf(Fields!Year.Value = Year(Today()) AND Fields!CalendarWeek.Value = Parameters!WeeklyVolumeDataCalendarWeek.Value - 5, Fields!Total_Volume.Value, Nothing))
Make sure your dataset contains the necessary data for the number of weeks you're trying to compare. If the dataset doesn't have data for the "first five periods" week, the result is indeed empty.
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @amgarav
When using Power BI datasets in paginated reports, it's important to understand that paginated reports don't directly support DAX measures in Power BI models. Instead, you'll need to use SQL queries or expressions to recreate the logic for these measures in a paginated report. This may involve getting the raw data through a query and then applying the necessary calculations in the report itself. For more information about connecting to Power BI datasets and limitations, you can check the following link:
Supported data sources for Power BI paginated reports - Power BI | Microsoft Learn
Regarding your expression issues, it seems likely that there may be spelling mistakes or logical errors in your expressions, especially in the way you handle day and week calculations. The corrected expression might look like this:
=Sum(IIf(Fields!Year.Value = Year(Today()) AND Fields!CalendarWeek.Value = Parameters!WeeklyVolumeDataCalendarWeek.Value - 5, Fields!Total_Volume.Value, Nothing))
Make sure your dataset contains the necessary data for the number of weeks you're trying to compare. If the dataset doesn't have data for the "first five periods" week, the result is indeed empty.
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
8 | |
5 | |
2 | |
2 | |
2 |