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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
trevordunham
Resolver I
Resolver I

Column filter by different months same table

I have a calculated field that averages scores. I want to create columns that return the score for january/february so I can have the Jan score, feb score and YTD score all within the same table visual.

 

I tried to do a simple IF(month([date])=1,[score]) = Jan score. But it wont let me return my score column in this calculation.

 

Any other thoughts or easier ways of going about this?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @trevordunham 

I'm happy to answer your questions. Based on your description, I used the following sample data:

1.png

We now need the score columns corresponding to January and February. We can use the SUMMARIZE function to group the dates.

2.png

Use the above function to create two new tables, containing the score columns for January and February respectively.

Table DAX formula:

 

Table = CALCULATETABLE(SUMMARIZE('Sheet2','Sheet2'[name],'Sheet2'[score],'Sheet2'[date]),MONTH('Sheet2'[date])=1)

 

The results are as follows:

3.png

Table2 DAX formula:

 

Table2 = CALCULATETABLE(SUMMARIZE('Sheet2','Sheet2'[name],'Sheet2'[score],'Sheet2'[date]),MONTH('Sheet2'[date])=2)

 

The results are as follows:

4.png

Create relationships into two new tables:

5.png

Use January and February score columns in table visual

6.png

To learn how to use the SUMMARIZE function, you can click on the link: https://dax.guide/summarize/

I have provided the sample PBIX file used this time below. If the above suggestions are helpful to you, that would be great.

 

 

 

 

How to Get Your Question Answered Quickly

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

Best Regards

Jianpeng Li

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

1 REPLY 1
Anonymous
Not applicable

Hi, @trevordunham 

I'm happy to answer your questions. Based on your description, I used the following sample data:

1.png

We now need the score columns corresponding to January and February. We can use the SUMMARIZE function to group the dates.

2.png

Use the above function to create two new tables, containing the score columns for January and February respectively.

Table DAX formula:

 

Table = CALCULATETABLE(SUMMARIZE('Sheet2','Sheet2'[name],'Sheet2'[score],'Sheet2'[date]),MONTH('Sheet2'[date])=1)

 

The results are as follows:

3.png

Table2 DAX formula:

 

Table2 = CALCULATETABLE(SUMMARIZE('Sheet2','Sheet2'[name],'Sheet2'[score],'Sheet2'[date]),MONTH('Sheet2'[date])=2)

 

The results are as follows:

4.png

Create relationships into two new tables:

5.png

Use January and February score columns in table visual

6.png

To learn how to use the SUMMARIZE function, you can click on the link: https://dax.guide/summarize/

I have provided the sample PBIX file used this time below. If the above suggestions are helpful to you, that would be great.

 

 

 

 

How to Get Your Question Answered Quickly

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

Best Regards

Jianpeng Li

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

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

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.