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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register 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
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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