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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anonymous
Not applicable

Monthly view via Measure or is there a simpler/better column view?

Hi all,

If I want to display month values as columns in a table do I have a better way than the one I chose?

I have created **twelve** measures filtering on the month:

"EK in April = CALCULATE ([purchase value], FILTER ( EK_DATA_manual, EK_DATA_manual[month] = 4 ))"

In the long run, however, it becomes quite a lot to have additional tables that reference other data tables. Another way might be to "unpivot" the table.

 

How do we solve something like that?

 

Regards,

Nawaz

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @Anonymous ,

If your data is divided into multiple years, I suggest that you can display the year and month together for group display, because if you only display the month, when calculating, a certain month of multiple years will be calculated together , instead of calculating a certain year and month separately.

1. Use the CALENDAR function to create a calendar table with dates from DATE(2020,1,1) to DATE(2021,7,27)

vyangliumsft_0-1627435068043.png

2. Create a calculated column

Year_Month =
YEAR('Table'[Date])&"-"&MONTH('Table'[Date])

3. Result.

vyangliumsft_1-1627435068048.png

 

Best Regards,

Liu Yang

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

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

How is your raw data structured.  Show that and your expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-yangliu-msft
Community Support
Community Support

Hi  @Anonymous ,

If your data is divided into multiple years, I suggest that you can display the year and month together for group display, because if you only display the month, when calculating, a certain month of multiple years will be calculated together , instead of calculating a certain year and month separately.

1. Use the CALENDAR function to create a calendar table with dates from DATE(2020,1,1) to DATE(2021,7,27)

vyangliumsft_0-1627435068043.png

2. Create a calculated column

Year_Month =
YEAR('Table'[Date])&"-"&MONTH('Table'[Date])

3. Result.

vyangliumsft_1-1627435068048.png

 

Best Regards,

Liu Yang

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

DataZoe
Microsoft Employee
Microsoft Employee

@Anonymous have you tried using the Matrix visual?  You can then put [Purchase Value] in Values, then [Month] in the Columns, just like a pivot table.  

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!