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

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
v-yiruan-msft
Community Support
Community Support

Hi @Anonymous ,

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
v-yiruan-msft
Community Support
Community Support

Hi @Anonymous ,

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

@Anonymous 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!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

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 ? 

 

@Anonymous 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/ba-p/279563


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

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

 

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.