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

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.

Reply
Anonymous
Not applicable

Adding a measure inside a dataset for a Power BI Report Builder report

Hi,

I need to manage an existing Power BI Report Builder report.

In particular, I need to change a dataset in order to add a measure that uses the PARALLELPERIOD function in order to calculate

the previous period invoiced.

The dataset exposes the rows having an year and month period, the invoiced amount of the current period and other columns.

At this dataset I've to add a such column:
Invoiced_12m = CALCULATE(SUM(Invoices[Invoiced_amount]), PARALLELPERIOD(Invoices[Periodo], -12, MONTH)).
I've tried to use the default dataset, selecting the columns and the measures of the Invoices table, but no value is returned

for the Invoiced_12m measure. This measure cannot calculate respect to the row context.
I've tried to modify the DAX query inside dataset ( EVALUATE SUMMARIZECOLUMNS(...) ), by introducing the ADDCOLUMNS function, so to determine the Invoiced_12m measure as an added columns, but no value is returned for it.

I think that I need to change the DAX expression in order to make the measure depending on the row context of the Invoices table.

Now, any suggests to me in order to solve this issue, please?

Many thanks

 

2 REPLIES 2
Icey
Community Support
Community Support

Hi @Anonymous ,

 

Try to add measure into your visuals directly just like so:

report builer expression.gif

 

 

 

Best Regards,

Icey

 

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

Anonymous
Not applicable

Hi,

but the Invoiced_12m is a measure and not a calculated column added to the Power BI table.
Moreover, the value for this measure isn't calculable respect to the single row context.
Thanks

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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