Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Using Measure Value in calculated column function

Hi there,

 

I am looking into getting into some intermediate analytics and I have got myself to a place where I feel like this should be working easily, yet it's not.

 

I am wanting to use a slicer to allow to the user to pick the axis of the chart they're seeing. I really don't want to use the bookmarks work around if possible as I was drop downs.

 

So far, I have created a new single column table with my choices. 

Axis 1
Axis 2
Axis 3

 

Then I have inserted a single selection slicer that is looking at this table. This is a drop down.

 

I then have measure that retrives the selected value of the slicer/table.

Measure = SELECTEDVALUE('Table'[Split], "")

 

Then I am creating a new column (as measure's can't be used as legends) that using an IF statement to assign the appropraite values to the column.

IF([Measure] = "Axis 1", MyTable[Axis1Values], IF([Measure='Axis 2", MyTable[Axis2Values], "ALL"))

This however doesn't work and will aways assign "All" to the column.

 

I have expeirmented with other calculations such as LASTNONBLANK which doesn't work as required either.

 

Any input would be appreciated.

 

Thank you.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , I think you need a dynamic axis. You can use bookmarks or some work around

 

Axis Slicer
Dynamically change chart axis in Power BI
bookmark -https://blog.crossjoin.co.uk/2018/04/20/dynamically-changing-a-chart-axis-in-power-bi-using-bookmarks-and-buttons/
https://radacad.com/bookmarks-and-buttons-making-power-bi-charts-even-more-interactive
https://www.youtube.com/watch?v=6jeSIRpjv0M
https://datamonkeysite.com/2020/10/22/change-dimension-dynamically-using-parameter-in-powerbi/

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

4 REPLIES 4
v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

Has your problem been solved, if so, please consider Accept a correct reply as the solution or share your own solution to help others find it.

 

Best Regards
Lucien

v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

Pls refer the following  similar thread which has provided a valid solution to dynamically show X-axis dimension.

 

Dynamic change in X Axis

 

And you also could refer the following articles:

https://community.powerbi.com/t5/Desktop/Dynamic-X-axis-via-slicer/m-p/797965 

https://community.powerbi.com/t5/Desktop/Help-on-dynamic-axis-based-on-slicer-value/m-p/838336 

 

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

amitchandak
Super User
Super User

@Anonymous , I think you need a dynamic axis. You can use bookmarks or some work around

 

Axis Slicer
Dynamically change chart axis in Power BI
bookmark -https://blog.crossjoin.co.uk/2018/04/20/dynamically-changing-a-chart-axis-in-power-bi-using-bookmarks-and-buttons/
https://radacad.com/bookmarks-and-buttons-making-power-bi-charts-even-more-interactive
https://www.youtube.com/watch?v=6jeSIRpjv0M
https://datamonkeysite.com/2020/10/22/change-dimension-dynamically-using-parameter-in-powerbi/

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi,

Yes I definitely need a dynamic axis but I really do not want to use bookmarks to do this if possible.

I'll look into the other resources.

Thanks

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.