Forum Discussion
Incorrect result with nested measure
Hi jct999
Just use a date table and all will be as you wish.
You may try adding REMOVFILTERS ( DATASET ) to 2nd Measure CALCULATE but I don't think it is going to work properly.
Hi tamerj1
Thanks for your reply,
I'm not sure that adding a Date table to the model will solve the problem, because the YEAR and MONTH columns are not strictly speaking time dimensions for the model. They could be replaced by other things, such as WEIGHT and SIZE... and the problem remain the same.
Using REMOVEFILTERS will remove all the outer filters that are applied in the visual (i.e on DATASET[COLOR], DATASET[PRICE_CATEGORY] ... etc), and it will produce incorrect results
It seems that the filters applied in the 2nd measures are not propagated within the nested measure (1st measure) ; and I dont't understand why... May be because :
- Filters in 2nd measure are not propagated into the VAR in the 1st measure ... ?
- There are to much nested calculations in the 1st measure : SUMX( SUMX ( CALCULATETABLE ( ... ) ) ... ?
- Context transition or iterator issue/poor understanding ... ?
DAX is complex to use !
Need help
Thanks