Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowHi -
I'm trying to calculate the percent change in a count of items labelled as "major" in a dataset between two different years. However, I don't have all consecutive years, just 2020, 2022 and 2023. This was causing issues for my formula and I've tried a few different approaches but still don't have a final solution. My current formula, pasted below, returns for all my variables except PrevYearCount, and I can't figure out why. It also returns 0 when 2020 is selected but is blank when 2022 or 2023 is selected.
Solved! Go to Solution.
hi @lhanson1
try like:
hi @lhanson1
try like:
This seems to work, thank you so so much! Why is the All() necessary, and only in one variable?
hi @lhanson1
Your year selection itself is a kind of filter context and ALL() is to remove such filter context.
Otherwise, it calculates something when year = 2020 and year = 2022, which returns blank.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
24 | |
15 | |
13 | |
12 | |
8 |
User | Count |
---|---|
30 | |
22 | |
15 | |
14 | |
14 |