Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Advanced and flexible parameters

TK23_0-1720432399484.png

 

I would like to know how to achieve this.

 

1. from Product_ID to Price is the actual data.

2. We would like to create Discount_Rate as a parameter for each Product and allow the user to change it freely in the report.

3. The number of rows in this table may increase, but we do not want to create a parameter for each increase because it would be impractical.

4. I would like the number of parameters displayed as slicers in the report to follow the increase in data.

4 REPLIES 4
Anonymous
Not applicable

Hi @Anonymous ,

 

Thanks for the reply from @foodd.

 

According to your screenshot, I can see that your Discount_Rate is related to Product_ID. This is the Discount_Rate column I created based on Product_ID:

Discount_Rate = DIVIDE('Table'[Product_ID],10)

 

Create a measure to calculate your predicted sales. I used the ALLEXCEPT function to calculate the Sales for each ID.

Forcast_Total_Sales = 
CALCULATE (
    MAX ( 'Table'[Price] )
        * ( 1 - MAX ( 'Table'[Discount_Rate] ) ),
    ALLEXCEPT ( 'Table', 'Table'[Product_ID] )
)

 

The final page visual effect is as follows:

vhuijieymsft_0-1720492858813.png

 

If you have any other questions please feel free to contact me.

 

The pbix file is attached.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

Anonymous
Not applicable

Hi Yang,

Thanks for the reply!
What I would like to do is a simulation - I would like to make Discount_Rate like a parameter, so that the user can freely change the value in the report and simulate the total. Is it possible?

Anonymous
Not applicable

Sorry I am new to this community.

I am attaching a pbix file.

Parameter_Test.pbix

foodd
Super User
Super User

Hello @Anonymous , and thank you for sharing a question with the Community.  This reply is informational. Please follow the decorum of the Community Forum when asking a question.

Please share your work-in-progress Power BI Desktop file (with sensitive information removed) and any source files in Excel format that fully address your issue or question in a usable format (not as a screenshot). You can upload these files to a cloud storage service such as OneDrive, Google Drive, Dropbox, or to a Github repository, and then provide the file's URL.

https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216

Please show the expected outcome based on the sample data you provided.

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523/highlight/true#M607150

This allows members of the Forum to assess the state of the model, report layer, relationships, and any DAX applied.

 

If your requirement is solved, please make THIS ANSWER a SOLUTION ✔️ and help other users find the solution quickly. Please hit the LIKE 👍 button if this comment helps you.  Proud to be a Super User!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.