Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
I am trying to write a measure to display the max sales of all time like the below example chart.
Assuming each column is sales for the month but in July 2020 sales was $7.5m, I would like the orange line to represent $7.5m.
I have the below measure that returns the correct value when used on a card visual but doesn't like being added to a chart, any suggestions for an alternate measure?
SalesRecord =
var _tbl = SUMMARIZECOLUMNS(_Calendar[Month],"Total",[SalesValue])
RETURN MAXX(_tbl,[Total])
Hi,
Does this measure work?
All time max = MAXX(ALL(_Calendar[Month_year]),[SalesValue])
Hi @Anonymous ,
@Anonymous , date or month ?
Try these measures
maxx(Values(Calendar[Month-year]), [SalesValue]) //Date or month ??
or
maxx(Values(Calendar[Date]), [SalesValue])
or
SalesRecord =
var _tbl = summarize(_Calendar[Date],"Total",[SalesValue])
RETURN MAXX(_tbl,[Total])
Thanks for the reply @amitchandak
To answer your question, Month not Date - I have updated my post to be clear.
Your suggestions return a chart that looks like the below.
@Anonymous , I think I forget to add allselected or all
calculate( maxx(Values(Calendar[Month-year]), [SalesValue]) , allselected (sales)) //assumes table as sales , ot use all if needed
or
calculate(maxx(Values(Calendar[Date]), [SalesValue]), allselected (sales))
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 63 | |
| 62 | |
| 42 | |
| 19 | |
| 16 |
| User | Count |
|---|---|
| 111 | |
| 105 | |
| 36 | |
| 28 | |
| 27 |