cancel
Showing results for
Did you mean:
Frequent Visitor

## how to add measure to x axis in graph

Hi All,

Need help to get below issue resolved.

I have a table with below values i.e., for each customer and correspoding partner there is some transaction going on daily(here count holds transaction value and date holds transaction date).

All i want is, two visualizations like below image

1. with top 10 customers whose sum(count) for selected period is more.

2. Graph that gives bucketing for count of customers who made  Zero Transaction i.e., sum(count)=0, 1 transaction i.e., sum(count)=1, 2-5 transactioni.e., sum(count) is 2 to 5, 6-10 i.e., sum(count) is 6 to 10, 11-20 i.e., sum(count) is 11 to 20 and so on for selected period. In below image it is named as save=0, save=1, save[2-5],save[6-10],save[11-20]..

If i select only 1 date(for example oct 1st ) as above image, values are coming correct. i.e., save[11-20]: 9 customers, save[6-10]:1 customer. But if i select multiple days(oct 1st to oct 3rd), the values in both the visualization will not match.

For oct 1st to oct 2nd, the graph should have values as save[21-30] :4 customers, save>30: 5 customers. But these are not appearing in graph at all.

DAX i have used to calculate are:

It is calculated column.(As i could not add measure to axis in graph i had to write calculated column)

Saves = IF(
Saves[count]=0,"Save=0",
if(Saves[count]=1,"Save=1",
if(Saves[count]>1 && Saves[count]<=5,"Save[2-5]",
if(Saves[count]>5 && Saves[count]<=10,"Save[6-10]",
if(Saves[count]>10 && Saves[count]<=20,"Save[11-20]",
if(Saves[count]>20 && Saves[count]<=30,"Save[21-30]",
if(Saves[count]>30 ,"Save>30")))))))

Problem is i cant put sum(saves[count]) in above DAX as it is calculated measure and it would give wrong values.

Can someone help with this DAX.

2 REPLIES 2
Frequent Visitor

Its ok if this is not a graph also. Can this be achieved for normal table?

Community Support

The chart X doesn't accept any measure. As the required chart Y axis values needs to be filtered by date slicer then count, though we create a separate to store values for chart X axis, we can't get finally count to match corresponding X range value. For your requirement, I'm afraid it can't be achieved.

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Announcements

#### Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

#### Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

#### Power BI Dev Camp - June 24th

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors