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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
DocDri
Helper I
Helper I

having years twice on x axis

Hello,

 

i have the following challenge:

 

There is a table with project data, which stores values for a month for different reporting periods:


PROJECT | Reporting Period | Date | Value
A | 1 | 01/2025 | 1000
B | 1 | 01/2025 | 1500
A | 2 | 01/2025 | 1200
A | 2 | 01/2025 | 1450
A | 1 | 02/2025 | 1200
A | 2 | 02/2025 | 1250
B | 2 | 02/2025 | 5000
A | 3 | 02/2025 | 2250
B | 3 | 02/2025 | 4000

 

this table is connected to a date table via the "Date" column.

 

I need a bar chart where I have the years on the x-axis. but each year for reporting period 1 and 2 so that the x axis looks like this:

2025 (period=1)
2025 (period=2)
2026 (period=1)
2026 (period=2)
and so on..

 

How could I solve this?

 

Many thanks for any help.

 

1 ACCEPTED SOLUTION
Akash_Varuna
Super User
Super User

@DocDri You can use a LOOKUPVALUE function then 

Year_Period = YEAR('Date'[Date]) & " (period=" & LOOKUPVALUE('YourTable'[Reporting Period], 'YourTable'[Date], 'Date'[Date]) & ")"

 

View solution in original post

6 REPLIES 6
v-hashadapu
Community Support
Community Support

Hi @DocDri , Just checking in—were you able to resolve the issue?
If one of the replies helped, please consider marking it as "Accept as Solution" and giving a 'Kudos'. Doing so can assist other community members in finding answers more quickly.
Thank you!

v-hashadapu
Community Support
Community Support

Hi @DocDri , Please let us know if your issue is solved. If it is, consider marking the answer that helped 'Accept as Solution', so others with similar queries can find it easily. If not, please share the details.
Thank you.

v-hashadapu
Community Support
Community Support

Hi @DocDri , Please let us know if your issue is solved. If it is, consider marking the answer that helped 'Accept as Solution', so others with similar queries can find it easily. If not, please share the details.
Thank you.

Akash_Varuna
Super User
Super User

@DocDri You can use a LOOKUPVALUE function then 

Year_Period = YEAR('Date'[Date]) & " (period=" & LOOKUPVALUE('YourTable'[Reporting Period], 'YourTable'[Date], 'Date'[Date]) & ")"

 

DocDri
Helper I
Helper I

@Akash_Varuna Thanks! But related does not work here, I think because it's a 1 (date) to many ('YourTable') connection.

Akash_Varuna
Super User
Super User

@DocDri For this, create a calculated column in your Date table with the following DAX formula:

Year_Period = YEAR('Date'[Date]) & " (period=" & RELATED('YourTable'[Reporting Period]) & ")"

Then, use this Year_Period column on the X-axis of your bar chart to display the years and reporting periods as desired.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.