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 :
Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.
Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!
User | Count |
---|---|
209 | |
51 | |
43 | |
41 | |
39 |
User | Count |
---|---|
270 | |
210 | |
73 | |
70 | |
65 |