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.
Hi Team,
I want to model my calendar table with 2020,2021, LTM, YTD Prior and YTD format (already having year column). For example, when i drag my column to x axis of bar chart it shoud show below measures "2020,2021, LTM, YTD Prior and YTD" and Y axis is the Value to show amoung the x axis. I want to implement the below chart with single barchart that contains 1 dimension value (x-axis) and 1 measure value (Y - axis).
Kindly help this scenario. to archieve this i have used muliple barchart and multiple measures. but i dont want that.
Hi @Jihwan_Kim
pls help me on this.
Solved! Go to Solution.
Hi Rico Zhou,
The solution you provided is next level. It works fine for me.
Thank you so much!!!
Hi @Murali777 ,
Firstly, X axis in visual only support us add columns in them. As a column, you will load all data into Power BI data model. So the data like "2021", "2022", "LTM"... all should be in your data model. However these data don't seem to be in the same dimension. "2021"/"2022" seem to be years, "LTM"/"YTD"...seem to be aggregation based on years.
Here I suggest you to create a new table with all data you need in it to create the X axis. And then create a measure by Switch function.
X axis =
{ "2021", "2022", "LTM", "YTD Piror", "YTD" }
Measure:
VALUE =
SWITCH (
SELECTEDVALUE ( 'X axis'[Value] ),
"2021", ...,
"2022", ...,
"YTM", ...,
"YTD Piror", ...,
"YTD", ...
)
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Rico Zhou,
I went for long leave. still i'm getting confused. can you pls share the simple PBIX file with the same result set?
Hi Rico Zhou,
The solution you provided is next level. It works fine for me.
Thank you so much!!!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
100 | |
88 | |
68 | |
61 |
User | Count |
---|---|
150 | |
120 | |
100 | |
87 | |
68 |