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.
I have a measure that gives its max value in the grand total.
Solved! Go to Solution.
Hi @priya_rajendran ,
I have created a simple smaple, please refer to it to see if it helps you.
How to get the current month's value in the grand total of a measure.pbix
Create a column about month first.
month = MONTH('Table'[date])
Then Create a measure.
Measure =
VAR _monthtoday =
MONTH ( TODAY () )
VAR _value =
CALCULATE (
MAX ( 'Table'[units] ),
FILTER ( ALL ( 'Table' ), 'Table'[month] = _monthtoday )
)
RETURN
IF ( ISINSCOPE ( 'Table'[date] ), MAX ( 'Table'[units] ), _value )
If I have misunderstood your meaning, you can create simple data with excel, then show me the screenshots about the data and the desired output your want.
Best regards.
Hi @priya_rajendran ,
I have created a simple smaple, please refer to it to see if it helps you.
How to get the current month's value in the grand total of a measure.pbix
Create a column about month first.
month = MONTH('Table'[date])
Then Create a measure.
Measure =
VAR _monthtoday =
MONTH ( TODAY () )
VAR _value =
CALCULATE (
MAX ( 'Table'[units] ),
FILTER ( ALL ( 'Table' ), 'Table'[month] = _monthtoday )
)
RETURN
IF ( ISINSCOPE ( 'Table'[date] ), MAX ( 'Table'[units] ), _value )
If I have misunderstood your meaning, you can create simple data with excel, then show me the screenshots about the data and the desired output your want.
Best regards.
@priya_rajendran , Use datesmtd, that will do that
calculate([unit], datemtd('Date'[Date])
or
Measure =
var _max = maxx(allselected(Table), Table[Date])
var _min = eomonth(_max,-1)+1 ,
return
if(eomonth(_max,0) =eomonth( max(Date[Date]),0) ,CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max)), [Unit])
Hi @amitchandak
Thanks for your reply. I am now able to get the current months's value in the total, but that value is getting reflected for the last month also. I want all the months to pick [unit] and only the total value should pick the current month's value.
Measure i used :
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |