Forum Discussion
paulinamaj
5 years agoFrequent Visitor
sameperiodlastyear and % change
Hello, I have a problem with formula "sameperiodlastyear" and % change last period. It shows wrong value when the period (month, quater, year) is not chosen on slicer. 1) I created a date table usi...
parry2k
Super User
5 years agopaulinamaj you can tweak your measure like this:
% last period =
IF ( HASONEVALUE ( YourDateTable[DateColumn] ),
CALCULATE( DIVIDE( 'Sales Valus PLN'[Total sales] - [Lastyearperiod], [Lastyearperiod]))
)
Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
- paulinamaj5 years agoFrequent Visitor
Hi, parry2k thank you. But now it stopped working correcly, shows non value for all year, only for last year of date (I have to choose month, quater, year on slicer).