Forum Discussion
grasa
Helper I
1 year agoShow Diff PY just once
Dear all, I would like to show a qty vs. previous year qty comparison. Therefore I already created a measure which calculates the % diff to last year. Do you have any idea how I could remove the ...
jaineshp
Memorable Member
1 year agoHey grasa,
Key Points:
- The issue occurs because Januar 2025 has no corresponding Januar 2024 data in your dataset
- Your original measure works fine when both current and previous year data exist
- These solutions handle the missing previous year data scenario
- Choose Option 1 if you want blanks, Option 2 for zeros, or Option 3 for custom text
Try this:
Diff % LY Modified =
IF(
ISBLANK([LY Menge]),
BLANK(),
DIVIDE([Gesamtmenge] - [LY Menge], [LY Menge])
)
Fixed? ✓ Mark it • Share it • Help others!
Best Regards,
Jainesh Poojara | Power BI Developer
grasa
Helper I
1 year agoMany thanks again! Indeed I have missing data, but for 2025.
If I use your measure but use "Gesamtmenge" instead of "LY Menge", the -100% for the missing data dissapears (that is also really nice to have, thanks 😊), but the empty Diff % LY column for 2024 still stays there.