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 start,end value bug

HI all,

Ive been trying to get the whatif parameter range based on some value of a table

however it seems that the start and end variables doesn't work well with measures.

here is an example

  1. I first created a measure called current quarter to intake a certain slicer value. so when I use my slicer this measure will change
    Current Quarter = SELECTEDVALUE('Mapping Period'[FY]) //'Mapping Period'[FY] is a slicer value
  2. I then created a measure of the desired range i want the what if parameter to be (take note I have input my previous measure as part of the filtering criteria):
    Current quarter AR = CALCULATE(SUMX(FILTER('Table-FCF','Table-FCF'[ACC] = "Accounts Receivable" && RELATED('Mapping Customer'[SECTOR]) = "company" && RELATED('Mapping Period'[FY]) = [Current Quarter]),'Table-FCF'[Value])/2000000)
  3. I then make this measure the start and end values of the range of the what if parameter
    what if parameter AR  = GENERATESERIES(-[Current quarter AR] ,[Current quarter AR],1)

When i do this the start and end values are all wrong and are some absurd number.

 

However if I change the Current Quarter measure to:

Current Quarter = "Q2 2020"

the correct start and end values are set however i am forced to change the code every quarter.

 

how do i make so that when i slice by my quarter the start and end values of the whatif parameter are displayed correctly?

 

 

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

OK, I read through this and I don't think what you are trying to do is compatible with What If parameter. A What If parameter generates a Table behind the scenes thus it is by definition not dynamic.


@ 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...

View solution in original post

2 REPLIES 2
Greg_Deckler
Super User
Super User

OK, I read through this and I don't think what you are trying to do is compatible with What If parameter. A What If parameter generates a Table behind the scenes thus it is by definition not dynamic.


@ 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

thanks!

After reading what you said I understand that tables cannot be recalculated dynamically like measures.

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.

Top Solution Authors