I wish to measure the % of the difference between each period to period before.
I am trying to create this report using Power BI for the first time.
When I was using an Excel pivot table, I created this reports by going to "value fields definitions" - "show values as" - "% difference from" - "(the last)".
My question is - I understand that in Power BI I need to write a measure to make this calculation.
Can you help me write this measure(s)?
Please find the attached PBI file with the data. What I need is to show the table in the file, only with the % of the difference between each year:
I also attach the Excel file to see how it should look.
Thanks
Hi Moshe,
There is a new feature in Power BI that allows you to create a 'Quick Measure'. For this to work you need to have a proper date field in your source data, not just the year. You'll see I have added this in the attached Power BI file.
From there you can build your matrix table, be sure to use the 'Date' field in the 'Rows' area, not your 'Year' field, as shown in the attached file.
To add a Quick Measure:
1. Click on the ellipses (...) in the field list > New quick measure.
2. Choose Time Intelligence: Year over Year change.
3. The Base value is 'Sum of Sales' and the Date field gets dragged to the 'Date' field area.
4. Number of periods is 1.
5. Click ok.
This will add the new measure to your field list and you can then add it to your matrix table.
Note: if you don't see the 'New quick measure' tool you need to download the latest version of Power BI Desktop.
Mynda
Hi again Mynda,
It almost worked...
I added the calculated column (Date) and the dates are there.
But when I try to create the new measure, when dragging the "Date" to the "Date field" (according to your number 3 stage), I get the following message:
"Only Power-BI provided date hierarchies or primary date columns are supported"
(I could not add a screenshot here).
Any ideas?
Regards
Moshe
Is the Date field set as Data Type: Date on the modeling tab?
Mynda
Of course Mynda!
Foolish me.
Now it works!
Thank you so much