Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
Hi there,
I am quite new to PowerBi and seem to have a simple question but that I cannot seem to solve myself.
My table looks like the example below:
Year | Contract number | Charged amount |
2020 | 1 | 500 |
2020 | 2 | 500 |
2019 | 1 | 100 |
2019 | 2 | 500 |
If I would only be interested in the amount for one year, I could apply a filter. However, I would like to compare the amounts charged in 2019 vs. 2020 and have a table similar to this one:
Year | Contract number | Charged amount in 2019 | Charged amount in 2020 |
2020 | 1 | 100 | 500 |
2020 | 2 | 500 | 500 |
Is there any possibility of applying two different filters to 2 columns in the same table?
Thank you for your help.
Kind regards,
Nele
Solved! Go to Solution.
@Nele90 , Create a table with distinct years, day date and then create measures like
//Only year vs Year, not a level below
This Year = CALCULATE(sum('Table'[Qty]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])))
Last Year = CALCULATE(sum('Table'[Qty]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])-1))
diff = [This Year]-[Last Year ]
diff % = divide([This Year]-[Last Year ],[Last Year ])
Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA
@Nele90 , Create a table with distinct years, day date and then create measures like
//Only year vs Year, not a level below
This Year = CALCULATE(sum('Table'[Qty]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])))
Last Year = CALCULATE(sum('Table'[Qty]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])-1))
diff = [This Year]-[Last Year ]
diff % = divide([This Year]-[Last Year ],[Last Year ])
Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
72 | |
71 | |
70 | |
43 | |
42 |
User | Count |
---|---|
49 | |
42 | |
29 | |
28 | |
27 |