Forum Discussion
How to chose axis for the graph
Hello everyone!
I have this data and I would like to see the distibution of the measure. To see in % how much of measure falls into range 0-10, how many 10-20. I was trying to show this on the bar graph but I dont know how to buid proper axis. I will be very thankful for help.
Anonymous ,
Can you share sample data and sample output in table format?
refer this
Hi, Anonymous
Based on your description, I created some sample data to reproduce your scenario. The pbix file is attached in the end.
I assume that the measure is as below.
Measure = SWITCH( SELECTEDVALUE('Table'[Vesse|Scheduled]), 67,0, 445,2, 469,1, 578,36, 1159,8, 1160,16, 1161,13, 1162,15, 1163,15, 1164,19, 1165,12, 1166,21, 1167,20, 1168,21, 1169,11, 1170,12, 1171,19, 1172,15, 1173,16, 1174,14, 1175,0, 1176,17, 1177,3, 1178,10, 1179,10, 1180,8, 1181,13, BLANK() )Table:
Test:
You may create a new measure as below.
Count = var _start = SELECTEDVALUE(Test[Start]) var _end = SELECTEDVALUE(Test[End]) var tab = SUMMARIZE( 'Table', 'Table'[Vesse|Scheduled], "Value", [Measure] ) var newtab = SUMMARIZE( Test, Test[Range], Test[Start], Test[End], "Count", var s = [Start] var e = [End] var t = ADDCOLUMNS( tab, "Flag", IF( [Value]>=s&&[Value]<e, 1,0 ) ) return COUNTROWS( FILTER( t, [Flag] = 1 ) ) ) return SUMX( newtab, [Count] )Result::
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 Replies
- v-alq-msft
Community Support
Hi, Anonymous
Based on your description, I created some sample data to reproduce your scenario. The pbix file is attached in the end.
I assume that the measure is as below.
Measure = SWITCH( SELECTEDVALUE('Table'[Vesse|Scheduled]), 67,0, 445,2, 469,1, 578,36, 1159,8, 1160,16, 1161,13, 1162,15, 1163,15, 1164,19, 1165,12, 1166,21, 1167,20, 1168,21, 1169,11, 1170,12, 1171,19, 1172,15, 1173,16, 1174,14, 1175,0, 1176,17, 1177,3, 1178,10, 1179,10, 1180,8, 1181,13, BLANK() )Table:
Test:
You may create a new measure as below.
Count = var _start = SELECTEDVALUE(Test[Start]) var _end = SELECTEDVALUE(Test[End]) var tab = SUMMARIZE( 'Table', 'Table'[Vesse|Scheduled], "Value", [Measure] ) var newtab = SUMMARIZE( Test, Test[Range], Test[Start], Test[End], "Count", var s = [Start] var e = [End] var t = ADDCOLUMNS( tab, "Flag", IF( [Value]>=s&&[Value]<e, 1,0 ) ) return COUNTROWS( FILTER( t, [Flag] = 1 ) ) ) return SUMX( newtab, [Count] )Result::
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- amitchandak
Super User
Anonymous ,
Can you share sample data and sample output in table format?
refer this
- AnonymousNot applicable
amitchandak Thank you for your answer. Those solutions would work for calculated column but this is measure and I dont have an option to group it.
How I should share sample data ? It seems that I can attache here only videos and photos...
- Ashish_Mathur
Super User
Hi,
This should be doable. Share the link from where i can download the PBI file.