Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

Numeric range parameter not being read correctly when trying to create a new column

Hi 

 

I am trying to use a numeric range parameter to create a new column.  I've been pulling my hair out because it looks like PowerBI is just reading the parameters as blank. See below the first screenshot where all I try to do is make the column equal to one of the parameters. I can't for the life of me figure out why the column is blank?! Second screenshot shows the report where I have the parameters.

 

Some more details. I have three parameters, ShiftYear, ShiftMonth and ShiftDay. My hope had been to combine these parameters together and compare to the start and end dates in my data to calculate some metrics of interest. These metrics change depending on what day you're looking at so I figured a new column that changes dynamically based on user input would be the way to go rather than having a new column for every possible day.

 


 

3 Replies

  • Hi Anonymous ,

     

    Here's why you're seeing blank:

    • While you can use a measure in a  calculated column or table,  the result does not respond to the slicer selection. It updates only upon data refresh or when the referenced column  or the formula itself is modified.
    • SELECTEDVALUE function that is used in the generated parameter measure returns blank if there are more than one values. There are more than one values because, as stated in the reason above, your measure does not respond to the slicer selection. Each row your calculated column reads your measure as BLANK.
    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi mate

       

      I've tried refreshing the data and using SELECTEDVALUE multiple times but am still having the same issue.

       

      What do you mean when you say there are multiple values? Each parameter only has one value.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Not sure if this will help anyone help me. I just tried doing it slightly differently. I made a measure that is absolutely definitely the datetime that I want and set the new column equal to that date. The datetime in the new column is 0 but it keeps any times I add on. So it's definitely reading the measure but just doing something super strange?!?!?