cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
harrison1998
Regular Visitor

what if parameter giving me an aggregation error

I have a column called duration. I want to create a dynamic what if parameter that a user can change.

Duration column

5’

10’

20

8’

….

If the parameter is set to 10’ and up then its “greater than parameter” or “less than parameter”

i.e.

5 less

10 less

20 greater

8 less

I created a parameter like this:

harrison1998_7-1634642498046.png

 

 

 

Then I create a new column:

 

 
harrison1998_8-1634642507808.png

 

 

With my function lookling like this:

lower_or_greater = IF(Parameter[Parameter Value] < 'individual lines csv'[Duration],"Smaller Parameter" , "Greater Parameter")

So this gets me the values Smaller/Greater Parameter like this:

 

 
harrison1998_9-1634642516199.png

 

 

But the problem that im currently having is that, even when I change the slider, it still is defaulted to the 500 default that I had set earlier:

Even with the slider that i put on there, it will not change the location"

 

harrison1998_10-1634642524744.png

 

 

 

Can someone tell me what im doing incorrectly perhaps.
my columns look like this:

 

 

 

harrison1998_11-1634642532612.pngharrison1998_12-1634642543051.pngharrison1998_13-1634642550589.png

 

 

 

 

 

1 ACCEPTED SOLUTION
yingyinr
Community Support
Community Support

Hi @harrison1998 ,

I created a sample pbix file(see attachment), please check whether that is what you want.

Create a measure as below to replace your original calculated column [lower_or_greater]:

yingyinr_1-1634898478006.png

Best Regards

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

View solution in original post

5 REPLIES 5
yingyinr
Community Support
Community Support

Hi @harrison1998 ,

I created a sample pbix file(see attachment), please check whether that is what you want.

Create a measure as below to replace your original calculated column [lower_or_greater]:

yingyinr_1-1634898478006.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Super User
Super User

@harrison1998 Columns are not dynamic based on user input, they are calculated once when created and only recalculated during data refresh.


@ me in replies or I'll lose your thread!!!
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Learn Power BI 2nd Edition

okay. So to have that feature, i made it into a measure with this: 

harrison1998_0-1634643300630.png

Now that I have that new measure, i want to bucket the 1's and 0's into a 100% stacked column chart. What can i do after doing this? 

 

or do you see what im trying to accomplish and do you have any other alternatives to what im trying to do ? 

 

@harrison1998 In general, to use a measure in that way, you need to use the Disconnected Table Trick as this article demonstrates: https://community.powerbi.com/t5/Community-Blog/Solving-Attendance-with-the-Disconnected-Table-Trick...


@ me in replies or I'll lose your thread!!!
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Learn Power BI 2nd Edition

does that work for what if parameters. and what did you mean by data refresh by any chance ? 

 

Helpful resources

Announcements
Power BI Show Ep 4 Post Show Carousel.jpg

The Power BI Community Show

Shabnam Watson demos Incremental refresh & Hybrid Tables and Leila Etaati demos Charticulator.

PBI April Release 2022 768x460.png

Check it out!

Click here to read more about the April 2022 updates!

Power BI Dev Camp Session 22 768x460.jpg

Check it out!

Mark your calendars and join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!