Forum Discussion
Ynew
8 years agoHelper I
Referring A Measure inside Another Measure
Hi, I have a problem with referring a measure in other measures. It seems that my second measure does not understand the reference, so could you generally explain a little bit about it? And here...
- 8 years ago
HI Ynew
Please try this MEASURE
TotalVolume = VAR mymonth = [LastMonth] RETURN COUNTAX ( FILTER ( 'Report1', 'Report1'[Month] = mymonth ), 'Report1'[Volume] )
Ynew
8 years agoHelper I
Zubair_Muhammad
8 years agoCommunity Champion
- Ynew8 years agoHelper I
Thank you very much.
As I compare, I see that yours is the same as mine. But still cannot understand why mine is not working! if it is related to Power BI version, or...!
- Zubair_Muhammad8 years agoCommunity Champion
- Zubair_Muhammad8 years agoCommunity Champion
Actually whats going on with your formula is that...... it is returning the Full Table.
Your MEASURE is calculated for each row of the Table and returns the Last Month for each filtered row.
Thats why you need to take the MEASURE out of the CALCULATE and put it in a VARIABLE before CALCULATION
TotalVolume = VAR mymonth = [LastMonth] RETURN COUNTAX ( FILTER ( 'Report1', 'Report1'[Month] = mymonth ), 'Report1'[Volume] )