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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Giada90
Helper III
Helper III

dynamic parameter

Hi,

I have a datasource like this:

Giada90_0-1721725417996.png

I need to have a table like this

 

Giada90_1-1721725772077.png

 

I need to have a parameter to choose if I want to see only actual or aactual+prevision1 or actual+prevision 2 or actual+prevision 3 based on what I choose on parameter, how can I do?

thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Giada90 ,

 

@Ritaf1983 , thanks for your concern about this case.

 

I made an attempt based on the user's requirement and implemented the result. Please check if there is anything that can be improved. Here is my solution:

 

1. Using the  original data:

 

vlinhuizhmsft_0-1721797081675.png


2. Create four measures which meet your requirements:

 

actual = SUM('Table'[actual])

Actual+Prevision1 = SUM('Table'[actual]) + SUM('Table'[prevision 1])

Actual+Prevision2 = SUM('Table'[actual]) + SUM('Table'[prevision 2])

Actual+Prevision3 = SUM('Table'[actual]) + SUM('Table'[prevision 3])

 

3. Create field parameters:

 

vlinhuizhmsft_1-1721797081682.png

4. Using parameters as values for the matrix.

 

vlinhuizhmsft_2-1721797187166.png

 

5.The result is as follows:

vlinhuizhmsft_3-1721797243685.png

 

Best Regards,
Zhu
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!

 

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hi @Giada90 ,

 

@Ritaf1983 , thanks for your concern about this case.

 

I made an attempt based on the user's requirement and implemented the result. Please check if there is anything that can be improved. Here is my solution:

 

1. Using the  original data:

 

vlinhuizhmsft_0-1721797081675.png


2. Create four measures which meet your requirements:

 

actual = SUM('Table'[actual])

Actual+Prevision1 = SUM('Table'[actual]) + SUM('Table'[prevision 1])

Actual+Prevision2 = SUM('Table'[actual]) + SUM('Table'[prevision 2])

Actual+Prevision3 = SUM('Table'[actual]) + SUM('Table'[prevision 3])

 

3. Create field parameters:

 

vlinhuizhmsft_1-1721797081682.png

4. Using parameters as values for the matrix.

 

vlinhuizhmsft_2-1721797187166.png

 

5.The result is as follows:

vlinhuizhmsft_3-1721797243685.png

 

Best Regards,
Zhu
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!

 

thanks!

Giada90
Helper III
Helper III

@Ritaf1983 thanks but my case is different, I need to make a sum between measures, how can I do?

Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

persontypeactualprevision
asales53
acost7

4

 

what I need to do with parameter and dax (not pivot)

personsales 
a5 (or 5+3 it depends from parameter 

 

Ritaf1983
Super User
Super User

Hi 

@Giada90 

This is a classic scenario for field parameters.

Please refer to the linked video:

https://www.youtube.com/watch?v=V6WchPDZibI&t=4s

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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