cancel
Showing results for
Did you mean:

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Helper III

## 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.

1 ACCEPTED SOLUTION
Community Support

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

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:

Table2 DAX formula:

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

The results are as follows:

Create relationships into two new tables:

Use January and February score columns in table visual

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.

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.

Community Support

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

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:

Table2 DAX formula:

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

The results are as follows:

Create relationships into two new tables:

Use January and February score columns in table visual

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.

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.

Announcements

#### Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

#### Power BI Monthly Update - April 2024

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

#### Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors