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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
red_arrowhead
Helper I
Helper I

How to create a sum measure with specific conditions

I have data divided into calander weeks. I have a few identifiers and their values divided into columns of calender weeks which are  created from dates and relationships with calender weeks. 

Now I want to have a visual with can showthe sum of first 5 identifiers together into all calender weeks and another row with sum of last 2 identifiers together into all calender weeks. 

How can I do it?

Example 

red_arrowhead_0-1612344947707.png

Here I want sum of all values of A,B,C,D together in those seperate CW

and sum of E,F into another row seperated into CW

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@red_arrowhead , Not very clear. You have to create a new column like this and use that

 


Switch(True(),
[identifier] in {"A","B","C", "D"} , "Cat1",
[identifier] in {"E", "F"},"Cat2"
)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@red_arrowhead , Not very clear. You have to create a new column like this and use that

 


Switch(True(),
[identifier] in {"A","B","C", "D"} , "Cat1",
[identifier] in {"E", "F"},"Cat2"
)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.