Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hello!
I have a sales data for which I am trying to use just the last 5 years data for any selected year. For this, I have taken Year & Sales . I have a slicer which is not linked to this table and is used to select the particular year.
Now, for this specific set of last 5 years data after selecting the Year from slicer, I need to multiply the sales with specific percentages.
I created a separate tabel with columns as Year Considered and Percentage. I want to multiply each row of the specific data from sales table to the percentage mentioned in another. But when I try to drop the Percentage in the table, it doesn't give me right answer, probably because it doesn't have a primary key. Any solution to this? Following is a snapshot of 2 tables and what I am looking for.
Sales Table with selected Year from slicer as 2021 which shows values for last 5 years:
Separate table with Percentage below:
The output I am looking for is as follows where I want to see Percentage which finally I want to multiply with sales to get a new number. But when I drop Percentage in this table to cross-check before multiplying, I get same number in each row.
Anyway to do this?
Thanksin advance!
You show an output that is not consistent with your text. It is also not clear how you link your "Years considered" to the sales facts. Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to work with. Please show the expected outcome.
I would like to rephrase this. Hopefullhy, I can explain problem better:
I have a sales table for which I am trying to use just the last 5 years data for any selected year and of course, data changes for selected year. Example as below where selected year is 2021 and it displays data for last 5 years from 2017:
and I would like to have percenatges shown below next to this sales data and then create a new column that multiplies sales with percentage.
Percentages will remain the same or constant for these 5 rows. But sales will change based on the selected year. In other words, if selected year was 2022, then sales data will display values for years 2018 - 2022. But the percentages above will still have the same sequence.
Right now, I am struggling to use these constant values next to each row.
Any help to resolve this issue would be appreciated. Thanks for your help in advance!
Your sample data does not cover the described issue. Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to work with. Please show the expected outcome.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
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.