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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
KatkaS
Post Patron
Post Patron

Multiple filters on a measure with calculated sum

Hello,

 

I'm trying to create a cummulative measure with another filter in it (in my case filter based on role),

but no luck so far, could someone help please?

 

Current measure, working fine (it is summarizing the amounts)

FTE Cumulative = CALCULATE(sum(table[  Recorded amount ]), FILTER(all(PERIOD[Report Date]),PERIOD[Report Date] <=MAX(PERIOD[Report Date])))
 
But when I try to add a filter based on the ROLE (e.g. I want to choose only Managers), I run into issues.
And I need a measure, I cannot simply filter in the visual, unfortunately..
 
Thank you!
PeriodManagerSpecialistNewcomerOther
2024/091 1 
2024/08 3 2
2024/0725  
2024/06-1 13
2024/0532  
     
     
     
     
5 REPLIES 5
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.

Please try creating a data model with having Role Dimension table.

 

Jihwan_Kim_1-1728538249189.png

 

 

Jihwan_Kim_0-1728538226897.png

 

 

FTE Cumulative = 
CALCULATE (
    SUM ( 'table'[Recorded amount] ),
    FILTER (
        ALL ( PERIOD[Report Date] ),
        PERIOD[Report Date] <= MAX ( PERIOD[Report Date] )
    )
)

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Thank you @Jihwan_Kim, for your time! If I add a slicer and filter for the roles with slicer, it is working properly, but I need a measure, not filter with a slicer (I need to deduct the result from another calculated measure..).

Hi,

Please let me know how your expected outcome looks like on the power bi report page.

That will help me a lot to step further.

Thank you.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
danextian
Super User
Super User

Hi @KatkaS 

What do you mean by this?


But when I try to add a filter based on the ROLE (e.g. I want to choose only Managers), I run into issues.
And I need a measure, I cannot simply filter in the visual, unfortunately..

Also, is the table your raw data?





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Thank you, @danextian, for quick reply! I mean that I'm not able to create correct measure that would include another filter based on role:

Current measure (working properly): 

FTE Cumulative = CALCULATE(sum(table[  Recorded amount ]), FILTER(all(PERIOD[Report Date]),PERIOD[Report Date] <=MAX(PERIOD[Report Date])))

 

One of many measures I tried (not working):

FTE Cumulative MANAGERS ONLY = CALCULATE(sum(table[  Recorded amount ]), FILTER(all(PERIOD[Report Date]),PERIOD[Report Date] <=MAX(PERIOD[Report Date]) && FILTER(table, table[  Role ] = "MANAGER"))

 

Yes, above is more or less my raw data, when I transform it in the Power query, it looks like this (in the table I only have changes in the roles for that  month):

PERIODROLEVALUE
01/09/2024MANAGER1
01/09/2024SPECIALIST-1
01/09/2024NEWCOMER2
01/09/2024OTHER3
01/08/2024NEWCOMER1
01/07/2024SPECIALIST-5
01/07/2024NEWCOMER8
   
   

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors