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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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"
)

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"
)

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

Top Solution Authors