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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
k_peter
Regular Visitor

ytd column to bar chart

I want to add my bar charts a YTD column.

I have created a date table with all the month and a 13. as YTD.

k_peter_0-1690360822762.png

Connected it to my data table. many to one relationship

For the bar chart I have created a measure.

Sol prep w YTD =
VAR Oldatkeszites_YTD =
        CALCULATE(AVERAGE('Report 2'[Oldatkészítés]),all('Month YTD Old'[Month]))
return
VAR Oldatkeszites =
        AVERAGE('Report 2'[Oldatkészítés])
        return

switch(SELECTEDVALUE('Month YTD Old'[Month]),"YTD",Oldatkeszites_YTD, Oldatkeszites)
 
As the month names with the ytd are in text format i needed to sort the axis by the month number where the ytd is the 13. It was ok. But after I have tried to do the same with box and whisper chart as well at that case the axis sort by monthno is not working. So I sorted the month by the month no directly in the table. After that the ytd datas dissapeared from my bar charts as wll. 
 
What could be the problem_? any idea?
0 REPLIES 0

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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