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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
youkangdong
New Member

how to set the axis for calcuated things to make graph manually.

I want to use the calculated value for graph's axis.

For example, i make calculated value "A", "B", "C"

if i use these values for graph, it is just made in a row without any distribution. 

so i'd like to make multiple axis by using calculated value (ex, "A", "B", "C" three 

how can i 

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @youkangdong ,

 

This seems to be related to the dynamic axis problem, please refer to the test file I provided, I hope it will be helpful to you.

Sales Amount Flexible Axis = 
IF (
    NOT ( ISBLANK ( [Axis Dimension Selected] ) ),
    SWITCH (
        [Axis Dimension Selected],
        "Region",
        CALCULATE (
            [Sales Amount],
            USERELATIONSHIP ( RegionYear[Region], Region[Region] )
        ),
        "Year",
        CALCULATE (
            [Sales Amount],
            USERELATIONSHIP ( RegionYear[Year], 'Year'[Year] )
        )
    )
)

vhenrykmstf_0-1628499480503.pngvhenrykmstf_1-1628499491141.png


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Below is the sample pbix file.

View solution in original post

2 REPLIES 2
v-henryk-mstf
Community Support
Community Support

Hi @youkangdong ,

 

This seems to be related to the dynamic axis problem, please refer to the test file I provided, I hope it will be helpful to you.

Sales Amount Flexible Axis = 
IF (
    NOT ( ISBLANK ( [Axis Dimension Selected] ) ),
    SWITCH (
        [Axis Dimension Selected],
        "Region",
        CALCULATE (
            [Sales Amount],
            USERELATIONSHIP ( RegionYear[Region], Region[Region] )
        ),
        "Year",
        CALCULATE (
            [Sales Amount],
            USERELATIONSHIP ( RegionYear[Year], 'Year'[Year] )
        )
    )
)

vhenrykmstf_0-1628499480503.pngvhenrykmstf_1-1628499491141.png


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Below is the sample pbix file.

amitchandak
Super User
Super User

@youkangdong , do you want dynamic axis.

Three option, Bookmark, Unpivot and Direct Query Dynamic Parameter 

 

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://www.youtube.com/watch?v=6jeSIRpjv0M


https://datamonkeysite.com/2020/10/22/change-dimension-dynamically-using-parameter-in-powerbi/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.