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.
Hi,
I'm trying to add a fixed value to my GP Per Lift measure. The measure below works, but if i add a fixed value of 3.5 it crashes my report.
This measure has a fixed value:
The below measure crashes my report.
Please find the link to my report below any help is much appreciated.
https://www.dropbox.com/s/n2fvokgrte5wvxg/Power%20BI%20Sample.pbix?dl=0
Solved! Go to Solution.
Returning constants from measures is generally a very bad idea. If you have 1000 customers 1000 products and 2 years worth of data (so 730 days) and you drag the product, customer and date onto a table with the operational cost measure the table will attemtp to return a row for every combination (so 1000 x 1000 * 730) which would be 730 million rows.
So I would suggest doing something like the following where you check if the measure is not blank before adding the constant value to it.
GP per Lift (excluding rent & doc) = VAR _operationCost = 3 VAR _part1 = [Lift Rate] - [Disposal Cost per Lift] RETURN IF( NOT( ISBLANK( _part1 ) ), _part1 + _operationCost )
Returning constants from measures is generally a very bad idea. If you have 1000 customers 1000 products and 2 years worth of data (so 730 days) and you drag the product, customer and date onto a table with the operational cost measure the table will attemtp to return a row for every combination (so 1000 x 1000 * 730) which would be 730 million rows.
So I would suggest doing something like the following where you check if the measure is not blank before adding the constant value to it.
GP per Lift (excluding rent & doc) = VAR _operationCost = 3 VAR _part1 = [Lift Rate] - [Disposal Cost per Lift] RETURN IF( NOT( ISBLANK( _part1 ) ), _part1 + _operationCost )
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |