Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
My problem:
I'm visualizing a graphic in Months (x-axis) by Value (y-axis).
When I click over June (for example) I want to change the x-axis from "Month" to "Clients". Then my graphic will show me the days of the month select (June) e the Value (y-axis) by Clients (the new x-axis)
Is it possible?
Solved! Go to Solution.
Hi,
I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
Creating a new table.
Axis table =
SELECTCOLUMNS (
UNION (
ALL ( 'Calendar'[Month-Year], 'Calendar'[End of Month] ),
ALL ( Clients[Clients], Clients[Index] )
),
"@Axis", [Month-Year],
"@index", 'Calendar'[End of Month]
)
Creating a measure
Desired outcome measure: =
IF (
NOT ISFILTERED( 'Calendar'[Month-Year] ),
CALCULATE (
SUM ( Data[Value] ),
TREATAS ( VALUES ( 'Axis table'[@Axis] ), 'Calendar'[Month-Year] )
),
CALCULATE (
SUM ( Data[Value] ),
TREATAS ( VALUES ( 'Axis table'[@Axis] ), Clients[Clients] )
)
)
Hi, @Tahech ;
Is your problem solved? If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
Creating a new table.
Axis table =
SELECTCOLUMNS (
UNION (
ALL ( 'Calendar'[Month-Year], 'Calendar'[End of Month] ),
ALL ( Clients[Clients], Clients[Index] )
),
"@Axis", [Month-Year],
"@index", 'Calendar'[End of Month]
)
Creating a measure
Desired outcome measure: =
IF (
NOT ISFILTERED( 'Calendar'[Month-Year] ),
CALCULATE (
SUM ( Data[Value] ),
TREATAS ( VALUES ( 'Axis table'[@Axis] ), 'Calendar'[Month-Year] )
),
CALCULATE (
SUM ( Data[Value] ),
TREATAS ( VALUES ( 'Axis table'[@Axis] ), Clients[Clients] )
)
)
Hello @Tahech
Maybe the folllowing links will help:
https://addendanalytics.com/blog/dynamic-axis-based-on-slicer-selection-in-power-bi/
https://radacad.com/dynamic-x-axis-on-charts-power-bi
https://www.youtube.com/watch?v=n-OWNaCUU0o