Skip to main content
cancel
Showing results for 
Search instead 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.

Reply
newgirl
Helper V
Helper V

Calculating for MAX also shows for other months in matrix

Hello! I'm working on this report wherein the set-up of the data source is that it gets the files from a SharePoint folder. Each file represents each month and each file shows the value input per day.

 

File for JanuaryFile for JanuaryFile for FebruaryFile for February

 

I use 'SharePoint Folder' as the data source and then unpivot the seleced columns to have only 1 column for the input values.

In my report, below are the 2 tables involved (calendar and main table).

packh3.JPG

 

And in my report page, there's a filter for the YearMonth. The measure I made to get the Nominal Capacity per month is 

EquipNominalCap = CALCULATE(MAX(fSolidPackhouse[Value]),fSolidPackhouse[Source]="Equipment Nominal Capacity",'CR tbl_SellingDays'[YearMonth])

but when I place it in my matrix table, it shows correctnly the value per month but it also shows even the nominal capacity for February even though the filter is only for January 2022.

packh4.JPG

 

How could I fix the measure for the Nominal Capacity so that it would only show the value for the filtered YearMonth?

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@newgirl,

 

Try removing the third argument in CALCULATE:

 

EquipNominalCap =
CALCULATE (
    MAX ( fSolidPackhouse[Value] ),
    fSolidPackhouse[Source] = "Equipment Nominal Capacity"
)

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
DataInsights
Super User
Super User

@newgirl,

 

Try removing the third argument in CALCULATE:

 

EquipNominalCap =
CALCULATE (
    MAX ( fSolidPackhouse[Value] ),
    fSolidPackhouse[Source] = "Equipment Nominal Capacity"
)

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thanks @DataInsights ! Forgot to try removing the last part. I thought it was important. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

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

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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