Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

What if Parameter not refreshing

Hi All, 

 

I have 2 tables containing years' data. 

I want to create a slicer that would filter the 2 tables at once. 

I created a "what if Parameter" with a default value. And a condition (a simple IF function) in each table, to check if the year in each line of the 2 tables matches the selected year. 

It doesn't work because when I select a year, the calculation (the condition in each table) uses the default value from the parameter rather than the one selected. 

Any idea why, please?

Thanks

JL

1 ACCEPTED SOLUTION

Hi, @Anonymous 

 

The value of the calculated column won't change as the slicer changes.

You can create a measure instead of column.

Like this:

 

Measure = IF(SELECTEDVALUE('Table'[year])=SELECTEDVALUE(Parameter[Parameter]),1,0)

 

vjaneygmsft_0-1635760459758.png

Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.


Best Regards,
Community Support Team _ Janey

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi, 

I have done a few trials, but it seems the Selected Year Value always uses the default value rather than the one selected in the slicer. I checked the Selected year value, and it equals the one from the slicer...

 

Hi, @Anonymous 

 

The value of the calculated column won't change as the slicer changes.

You can create a measure instead of column.

Like this:

 

Measure = IF(SELECTEDVALUE('Table'[year])=SELECTEDVALUE(Parameter[Parameter]),1,0)

 

vjaneygmsft_0-1635760459758.png

Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.


Best Regards,
Community Support Team _ Janey

Anonymous
Not applicable

Thanks heaps 🙂

amitchandak
Super User
Super User

@Anonymous ,

are you creating a measure like 

calculate(**bleep**(Table1[Value]), filter(Table1, Table1[Year] = [what if Value]))

 

if not try above.

 

Slicer do work with columns, if you are trying one

Anonymous
Not applicable

Hi,

My formula is:

SELECTED YEAR = if('PurchaseOrders_GL connection'[RECEIVED FY]='SELECTED YEAR'[SELECTED YEAR Value],1,0)
 
I tried this as per your proposal (for my second table):
SELECTED YEAR = CALCULATE(1,filter(KeyTasks,KeyTasks[FY Key TASK]='SELECTED YEAR'[SELECTED YEAR Value]))
 
None of the 2 works. 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.