Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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
User | Count |
---|---|
98 | |
90 | |
78 | |
72 | |
65 |
User | Count |
---|---|
114 | |
98 | |
96 | |
68 | |
67 |