cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jo1245
Frequent Visitor

Filtered max in multiple columns then Sum of 4th column

Good day

I am brand new to Power BI and trying to create the measure below:

I am trying to create a measure by using the table "Sampledata" below and filtering max in "Year(fiscal)" column, and filtering max in "Month(period)" column, and filtering by "Check[In Scope]" column then sum "$" column. The answer should be 711242.80

 

Sampledata Table

Product division$CheckMonth(period)Year(fiscal)
Frozen1185.98In Scope102022
Frozen14596.32Out of scope92021
Frozen178.61In Scope102022
Frozen521.8Out of scope112021
Dry123409.2In Scope102022
Dry1325.94Out of scope92022
Dry22.8Out of scope92021
Frozen6487.3Out of scope102022
Frozen557566.2In Scope102022
Dry12015.16In Scope102022
Dry8071.98In Scope102022
f44.14In Scope102022
Dry8771.6In Scope102022

 

This is what the table looks like in excel with the filters:

Jo1245_1-1652268015664.png

thank you

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Jo1245 , Better to have new column like

 

Year Month = [Year]*100 +[Month]

 

Measure = calculate(Sum(Table[$]), filter(Table, Table[Year Month] = maxx(allselected(Table), Table[Year Month]) ) )



Power BI Features || Datamarts: https://youtu.be/8tskWsJTEpg || Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Time Intelligence Decoded : https://youtu.be/aU2aKbnHuWs&t=145s
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my youtube Channel !!
Want To Learn Power BI | Beginners !! Advance Concepts !! Power BI For Tableau User !!

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Jo1245 , Better to have new column like

 

Year Month = [Year]*100 +[Month]

 

Measure = calculate(Sum(Table[$]), filter(Table, Table[Year Month] = maxx(allselected(Table), Table[Year Month]) ) )



Power BI Features || Datamarts: https://youtu.be/8tskWsJTEpg || Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Time Intelligence Decoded : https://youtu.be/aU2aKbnHuWs&t=145s
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my youtube Channel !!
Want To Learn Power BI | Beginners !! Advance Concepts !! Power BI For Tableau User !!

Helpful resources

Announcements
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors