The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello Power BI Community!
I have a very simple query that is causing me quite the headache.
Basically, what I am trying to achieve is to have a slicer on the page which shows fiancal year and a card visual that displays the sum of the values for the previous year based on which year the user has selected in the slicer.
My current data model looks like this and the idea is to have multiple tables which connect to the Calendar one:
Tables:
- Table
Period Margin Product
2021 | 20210 | A |
2022 | 121392 | A |
2023 | 123142 | A |
2021 | 2141 | A |
2022 | 1351 | A |
2023 | 12341 | A |
2021 | 1214 | B |
2022 | 12414 | B |
2023 | 5142 | B |
- Calendar
Financial Year
2021 |
2022 |
2023 |
They are connected via a one-to-many relationship with a single filter direction going from Calendar to Table.
When I use this formula + a slicer for Period from the Table table it is working:
Hi,
for this kind of scenario, I would suggest you to create a new column in your date table for as NewYear = Year + 1,
then use this Newyear in your Slicer. It should work.
Note: the above solution is provided based on the requirement considering there is only one visual and Year as slicer.
let me know if this works.
User | Count |
---|---|
27 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
31 | |
15 | |
12 | |
11 | |
7 |