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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Is it possible to have a dynamic column based off a slicer/filter?

I am trying to create a dynamic column that will reflect a percent change from a total amount. I would like to be able choose a percent change of "Total Charge" from the slicer on the left that would then reflect in the data columns on the right.

 

PBI1.PNG

Is it possible to have one column (to the right of "Total Charge") that could change based off of my slicer to show the percent change of the "Total Charge" value? I have already created measures in this table that do this calculation, but would like only one measure to show up at a time based off of the slicer selection. 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Anonymous ,

 

I assume that the % is a table that you have correct?

 

You need to add the percentage values to that table it has to look something like this:

 

  %              Category

-0,1 10% Decrease
0,1 10% Increase
-0,25 25% Decrease
0,25 25% Increase
-0,05 5% Decrease
0,05 5% Increase
0

Baseline

 

Then add the following two measures:

 

Selected % = SELECTEDVALUE(Percentages[%])



Total adjusted =
IF (
    COUNT ( Percentages[%] ) > 1;
    "Need to select only one percentage value";
    SUM ( Revenue[Total Charge] ) * ( 1 + [Selected %] )
)

Then add this measure to your table, check the result on the PBIX file attach.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

Hi @Anonymous ,

 

I assume that the % is a table that you have correct?

 

You need to add the percentage values to that table it has to look something like this:

 

  %              Category

-0,1 10% Decrease
0,1 10% Increase
-0,25 25% Decrease
0,25 25% Increase
-0,05 5% Decrease
0,05 5% Increase
0

Baseline

 

Then add the following two measures:

 

Selected % = SELECTEDVALUE(Percentages[%])



Total adjusted =
IF (
    COUNT ( Percentages[%] ) > 1;
    "Need to select only one percentage value";
    SUM ( Revenue[Total Charge] ) * ( 1 + [Selected %] )
)

Then add this measure to your table, check the result on the PBIX file attach.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

This is exactly what I was looking for. Thank you!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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