cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
lippert Frequent Visitor
Frequent Visitor

Dynamic Column

Hi guys

 

Thanks in advance for your help.

I need help creating a dynamic column, that switches between Actuals 2018 and Forecasts 2019.

The table currently looks like the below, with forecasts 2019 being the dynamic column:

 

Problem.PNGThe user has to have the option to toggle between actuals 2018 or forecasts 2019. Perhaps a parameter? The option to toggle between these two fields has to appear as a slicer on the report ideally.

When choosing actuals 2018 or forecasts 2019 for the dynamic column, the actual 2019 column would not be affected, but the variance and variance % would change. The calculation for variance = (Actual 2019 - (Actual 2018 or Forecast 2019 - dynamic column). Variance % = Variance / Dynamic column

 

I hope this is clear.

 

Please ask if there is anything that seems unclear.

 

Thanks!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Dynamic Column

Hi @lippert,

 

I made one sample for your reference. Although we cannot achieve the exactly same goal as you want. We can can do the steps as below to work around.

 

1. Enter a table directly as a slicer table.

 

2. Create measures as below.

 

Variance = var _sele = SELECTEDVALUE('Slicer'[slicer])
return
IF(_sele= "Actual 2018",SUM(Table1[Actual 2019])-SUM(Table1[Actual 2018]),SUM(Table1[Actual 2019])-SUM(Table1[Forecast 2019]))
%Variance = var result = [Variance]/SUM(Table1[Forecast 2019])
return
IF(ISBLANK(SUM(Table1[Forecast 2019])),BLANK(),result)

Capture.PNG

 

Please check the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: Dynamic Column

Hi @lippert,

 

I made one sample for your reference. Although we cannot achieve the exactly same goal as you want. We can can do the steps as below to work around.

 

1. Enter a table directly as a slicer table.

 

2. Create measures as below.

 

Variance = var _sele = SELECTEDVALUE('Slicer'[slicer])
return
IF(_sele= "Actual 2018",SUM(Table1[Actual 2019])-SUM(Table1[Actual 2018]),SUM(Table1[Actual 2019])-SUM(Table1[Forecast 2019]))
%Variance = var result = [Variance]/SUM(Table1[Forecast 2019])
return
IF(ISBLANK(SUM(Table1[Forecast 2019])),BLANK(),result)

Capture.PNG

 

Please check the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

lippert Frequent Visitor
Frequent Visitor

Re: Dynamic Column

Thanks so much Frank!

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors