Forum Discussion
Total sum is not coming.
- 7 years ago
If you change the measure [FFE_Saving_Curr_Yr_ETA_sum] to return VAR cal:
... ) VAR cal = container_count_last_yr - ( Lot_Vol_last_yr / fill_select ) // actual formula VAR FFE_value = SELECTEDVALUE ( 'Test2'[FEE Value(from FFE Factor)]) VAR FFE = cal * FFE_value RETURN calWe can use that in a SUMX measure that will return what I think you are looking for.
_test = SUMX( VALUES ( Test2[CsSizeType] ), [FFE_Saving_Curr_Yr_ETA_sum] * CALCULATE ( SELECTEDVALUE ( 'Test2'[FEE Value(from FFE Factor)] ) ) )I have uploaded the updated file here. https://www.dropbox.com/s/kldgezrb6k8jpd0/dummy.pbix?dl=0
The correction comes from the context transition of the CALCULATE in measure that I am still studying but I think the fix works.
Hello Anonymous
Your problem is coming from this line.
VAR FFE_value =
SELECTEDVALUE ( 'Test2'[FEE Value(from FFE Factor)] )When SELECTEDVALE receives more than one result it returns a blank unless you tell it what you want. To test it you can change the RETURN of your measure to be.
RETURN FFE_value
And see the result, no FFE_value comes back on the total because it is getting more than one result.
My follow up post has a fix in it.
- jdbuchanan717 years ago
Super User
If you change the measure [FFE_Saving_Curr_Yr_ETA_sum] to return VAR cal:
... ) VAR cal = container_count_last_yr - ( Lot_Vol_last_yr / fill_select ) // actual formula VAR FFE_value = SELECTEDVALUE ( 'Test2'[FEE Value(from FFE Factor)]) VAR FFE = cal * FFE_value RETURN calWe can use that in a SUMX measure that will return what I think you are looking for.
_test = SUMX( VALUES ( Test2[CsSizeType] ), [FFE_Saving_Curr_Yr_ETA_sum] * CALCULATE ( SELECTEDVALUE ( 'Test2'[FEE Value(from FFE Factor)] ) ) )I have uploaded the updated file here. https://www.dropbox.com/s/kldgezrb6k8jpd0/dummy.pbix?dl=0
The correction comes from the context transition of the CALCULATE in measure that I am still studying but I think the fix works.
- Anonymous7 years agoNot applicable
Thanks for quick response..