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

Only fill 1st row with value

Hi, 

 

I have a table where the end user wants to download the data, but make some manipulations to two columns after downloading ('factor' and 'factor Inc'), which would impact the final formula of 'Sku Increase'

 

I put a string of the formula they want to use in the 'Sku Increase' column, figuring they could enable the function once they download the data. 

 

Is there a way to only have this string show on the first row? 

  • Right now it refers to row 4 for every single row. 
  • It should only show for the first row no matter how they sort the table . 

slacey7070_0-1640294415888.png

 

Extra information 

 

When downloaded, the table looks like this in Excel. 

  • You can see the formula in column AV all refer to row 4

slacey7070_1-1640294850414.png

 

Currently, the user has to click on AV4 and hit enter to make the formula work

slacey7070_2-1640294921390.png

 

Then if they drag that cell down it will work - But I'd prefer not to have possible user error having all these other rows populated with row 4's reference in case of user error. 

slacey7070_3-1640295018491.png

 

The formula right now in Power BI just creates the text string of the formula. 

slacey7070_4-1640295089759.png

 

 

Thank you

 

 

3 ACCEPTED SOLUTIONS
bcdobbs
Super User
Super User

Really interesting approach.

 

Don't think you can limit it to only top row without some sort of row ID to filter the dax on.

 

Instead could you use excel table references? Eg [@[ColumnName]] which would reduce possible error?

https://support.microsoft.com/en-us/office/using-structured-references-with-excel-tables-f5ed2452-23...

 

 



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

View solution in original post

Just another thought, could they do the manipulation live in the service with what if parameters:

 

https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-what-if



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

View solution in original post

Both of these suggestions are good. Table references should be row-independent but a what-if parameter along with a measure does seem like a cleaner solution.

 

There's a bit of a wrinkle in that you can't use a dynamic parameter to modify a calculated column but I'm confident you could create an equivalently functioning measure unless the columns include recursive logic that cannot be refactored.

 

@Anonymous In this simplest case where those columns are just constants, you don't need to export anything to tinker with those factors. Set up the two what-if parameters and use them in a measure like

Sku Increase = [Factor value] * [Factor Inc value] * [Adj Qty measure]

View solution in original post

6 REPLIES 6
bcdobbs
Super User
Super User

Really interesting approach.

 

Don't think you can limit it to only top row without some sort of row ID to filter the dax on.

 

Instead could you use excel table references? Eg [@[ColumnName]] which would reduce possible error?

https://support.microsoft.com/en-us/office/using-structured-references-with-excel-tables-f5ed2452-23...

 

 



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Anonymous
Not applicable

You are fantastic, thank you @bcdobbs !

Just another thought, could they do the manipulation live in the service with what if parameters:

 

https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-what-if



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Anonymous
Not applicable

I love this idea, and would have gone with this one as it's quite elegant.  However, the end users are downloading a decent amount  distinct skus and stores, and each store or product can have different variables to adjust - so they're thinking it'd be easier to do that part in Excel.  I'm going to go with your other suggestion on this one, but will keep this in mind for the future, thanks!

Both of these suggestions are good. Table references should be row-independent but a what-if parameter along with a measure does seem like a cleaner solution.

 

There's a bit of a wrinkle in that you can't use a dynamic parameter to modify a calculated column but I'm confident you could create an equivalently functioning measure unless the columns include recursive logic that cannot be refactored.

 

@Anonymous In this simplest case where those columns are just constants, you don't need to export anything to tinker with those factors. Set up the two what-if parameters and use them in a measure like

Sku Increase = [Factor value] * [Factor Inc value] * [Adj Qty measure]
Anonymous
Not applicable

@AlexisOlson  This great - I really appreciate both of your ideas!

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.