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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
febing
Frequent Visitor

Power BI - 2 Columns with similar values

Hi

I am pretty new to Power BI. Have a very basic question. I am preparing a roster report on a calendar matrix view based on excel data. Now the concern is I have 2 columns Task 1 and Task 2 having the same set of values against each employee. Task 1 for one employee could be Task 2 for the other and vice versa.

 

My requirement is basically I should be able to slice the data based on both the values. For isntance is I select Call Handling, I should get count 3 since based on the combination of Task 1 or Task 2. How will I achieve this in PowerBI.  Thanks for your support

 

I dont want to combine the 2 columns and create a merged cell, because that will not solve my purpose

 

 

Task 1

Call Handling
Incidents
Mailbox
Escalations

Task 2

Issues
Access
Escalations
Access

 

Regards

Febin Gafoor

 

 

1 ACCEPTED SOLUTION
v-jingzhan-msft
Community Support
Community Support

Hi @febing 

 

Not sure if I understand the target correctly. You can add an additional table to have all distinct task values in a column. Lets call the table 'Dim Task'. Make sure this table is disconnected from other tables. Use task column from this 'Dim Task' table into the slicer. Then you can try the following measure to count the results. 

count measure =
VAR _selectedTask = SELECTEDVALUE ( 'Dim Task'[Task] )
RETURN
    COUNTROWS ( FILTER ( 'table', 'table'[Task 1] = _selectedTask ) ) + COUNTROWS ( FILTER ( 'table', 'table'[Task 2] = _selectedTask ) )

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

View solution in original post

3 REPLIES 3
v-jingzhan-msft
Community Support
Community Support

Hi @febing 

 

Not sure if I understand the target correctly. You can add an additional table to have all distinct task values in a column. Lets call the table 'Dim Task'. Make sure this table is disconnected from other tables. Use task column from this 'Dim Task' table into the slicer. Then you can try the following measure to count the results. 

count measure =
VAR _selectedTask = SELECTEDVALUE ( 'Dim Task'[Task] )
RETURN
    COUNTROWS ( FILTER ( 'table', 'table'[Task 1] = _selectedTask ) ) + COUNTROWS ( FILTER ( 'table', 'table'[Task 2] = _selectedTask ) )

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

Perfect my friend. This is exactly what i was looking for. Infact i was joining all the tables and this was not giving the correct result. Thanks once again.

lbendlin
Super User
Super User

Please read about data models, dimensions and facts,  Prepare your data accordingly and then wire it up in Power BI according to the business question.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors
Top Kudoed Authors