Quantcast
Viewing all articles
Browse latest Browse all 217097

Use a measure an an axis (dynamic axis selection)

So, I am trying to create a dynamic column chart, looking at the distribution of employees salary. I would like to be able to give the user the ability to select their own salary intervals (e.g. 2k, 5k, 10k etc).

 

I have successfuly created a measure field to do the calculation, based on a slicer, using:

 

Interval = if(HASONEVALUE(tbl_PayInterval[Interval]),
roundup(sum('Basic Pay'[BASIC_PAY])/values(tbl_PayInterval[Interval]),0)*values(tbl_PayInterval[Interval]),0)

 

This rounds up the pay for each record in the table to the nearest selected interval (where tbl_PayInterval is my single-column table that feeds the slicer).

 

The problem is that I can't then use the Interval field as an x axis for a column chart (it won't let me)

 

I could use a calculated field as an axis, but I can't create the same results: it returns zeros based on the if(HASONEVALUE returning false.

 

Any suggestions, please? Thanks!


Viewing all articles
Browse latest Browse all 217097

Trending Articles