Forum Discussion
bleow
5 years agoFrequent Visitor
Reference data in charts in text box
I need to generate sentences referencing data in graphs, e.g. the 32% and 30% in the chart as shown below: to come out with sentences like "the highest X is [value] at [percent]". Curre...
- Anonymous5 years ago
You can create a measure using a card visual. Please check my example below:
Measure =VAR topitem = CALCULATE(MAX([Item]),FILTER('Table',[Value]=MAXX(ALL('Table'),[Value])))VAR top_percent = FORMAT(MAXX(ALL('Table'),[Value]) / SUMX(ALL('Table'),[Value]),"percent")Return CONCATENATE("The Highest Item is ", CONCATENATE(topitem, CONCATENATE(" at ", top_percent)))Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
amitchandak
5 years agoSuper User
bleow , Try a measure like
divide(CALCULATE([Measure],TOPN(1,allselected('Table'[category]),[Measure],DESC),VALUES('Table'[category])), [Measure])
or
divide(CALCULATE([Measure],TOPN(1,allselected('Table'[category]),[Measure],DESC),VALUES('Table'[category])), calculate([Measure],all(Table)))