Forum Discussion

o59393's avatar
o59393
Post Prodigy
6 years ago
Solved

How to create calculated column updated with parameter single value

Hi all

 

I need to have a calculated column that is equal to a parameter single value.

 

For example if I select the parameter value is 6.4, then all the values in the column should update to 6.4

 

First I created the parameter:

 

 

I created a calculated column like this:

 

 

However as you see, the column shows empty values.

 

How should I create the column?

 

Thanks. 

  • Hi amitchandak  and Greg_Deckler 

     

    I was able to solve it, it was easier than I though it would be:

     

    Parts 3 total what if = (Parameter[Parameter Value]*SUM(Query1[AC])*5.678*0.01)/1000

     

     

    Thanks. 

6 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion
    Columns are not dynamic and thus it is not possible to do what you want. You would need to use a measure. Columns are only calculated during data load.
    • o59393's avatar
      o59393
      Post Prodigy

      Hi Greg_Deckler 

       

      My intention is to be able to compare the totals of fixed values versus what if values (defined by the parameter) in order to determine the totals spent.

       

      The parameter value should multiplied by *Query1[AC]*5.678*0.01)/1000. For this the calculated colum Part 3 totals  already does that formula, but for the fixed values.

       

      I would like to have in the calculted column  Part 3 totals what if parameter the parameter multiplied by *Query1[AC]*5.678*0.01)/1000 and therefore make the comparison stated before (part 3 totals vs part 3 totals what if parameter)

       

      Here are the fixed values defined for one product and its 2 types:

      Beverage ProductTypeValidity Start DateValidity End DatePart 3
      Fioravanti StrawberryABC5401/1/20175/14/20190
      Fioravanti StrawberryABC145/15/2019 4

       

      And for the below image, in (1) is the result for each type using fixed values of 0 and 4. Please see excel attached, sheet Part 3 totals calculation , cells G780 and R212 where the results are explained for the calculated column Part 3 totals

       

       

      Also, in the excel attached, tab called Part 3 totals calculation if, cells H780 and R212 contain the desired result for the what if scenario parameter (let's say we would use 6.4 in the parameter).

       

      So in (2) of the image I would like to have the result with the parameter. 

       

      Pbix and excel: https://1drv.ms/u/s!ApgeWwGTKtFdhlh6ltrmZwk01BWQ?e=19LoaS

       

      Let me know if it's clear.

       

      Thanks!

       

  • o59393 , you can create a dynamic measure not column. What is the requirement? Where you want to use that

      • o59393's avatar
        o59393
        Post Prodigy

        Hi amitchandak  and Greg_Deckler 

         

        I was able to solve it, it was easier than I though it would be:

         

        Parts 3 total what if = (Parameter[Parameter Value]*SUM(Query1[AC])*5.678*0.01)/1000

         

         

        Thanks.