Forum Discussion
thems5
8 years agoRegular Visitor
Power BI measure
Hi, I wish to measure the percentage 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 ta...
v-jiascu-msft
Microsoft Employee
8 years agoHi Moshe,
Just based on your data here, please try the formula below.
Measure =
VAR thisYearTotal =
SUM ( 'DB_sample'[Sales] )
VAR lastYearTotal =
CALCULATE (
SUM ( 'DB_sample'[Sales] ),
FILTER (
ALL ( DB_sample[Year] ),
DB_sample[Year]
= MIN ( DB_sample[Year] ) - 1
)
)
RETURN
DIVIDE ( thisYearTotal - lastYearTotal, lastYearTotal, 0 )
Best Regards,
Dale
thems5
8 years agoRegular Visitor
- v-jiascu-msft8 years ago
Microsoft Employee
Hi thems5,
Can you share your file? Please refer to the snapshot below. Double click the menu "Modeling".
Best Regards,
Dale
- thems58 years agoRegular Visitor
Thank you.
I cannot find the way to attach a file here so I attached it in my email reply.
Regards
Moshe