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
MacJasem
Helper II
Helper II

How do i create a filter with DAX that either adds or seperates data from eachother in a table?

Hi guys

I really need some thoughts on this one... 

The Scenario:

 

Lets imagine you have three companies (comapny A, B & C) that reports financial to one accountant. In the yearly P&L statement report the accountant wants to be able to show the board either all three P&L statements seperately or company A&B togeather and C for it self. 

The accountant currently has this statement for each company shown in his PowerBI visual, in the example this would be for Company A, and then another for Company B etc. 

 

fe1a6ebdcb0b0f5a6289b66ee8f0e40e.jpg

  

The Accountant has asked if he could have the filter option to click on either Group X or Group Y. Group X being Company A+B, and Group Y being Company C.

 

So when nothing in this filter is chosen the default would be as is, and if Group X is chosen in the filter the P&L Statements for Comapny A & B would be added togeather so that the Accountant only sees one P&L Statement consisting of the two companies data i every row.

How should i take on this task 😄

 

Any ideas or examples?

1 ACCEPTED SOLUTION
Idrissshatila
Super User
Super User

Hello @MacJasem ,

 

So you should be able to know each transactions is for what company, then you could add a calculated column to define the new concept which its like if company is related to A or B then "Company x" else company Y so this way you configure that A & B belong to X and when you filter with X it will automatically get the data or companies A & B.

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




View solution in original post

2 REPLIES 2
MacJasem
Helper II
Helper II

Hi @Idrissshatila 

 

Thanks for the suggestion, but i've already got a column that groups the companies into group X and Y, but this does not make the financial statement become one when group X is selected, istead i get the two companies statements seperately after eachother in a table.

Idrissshatila
Super User
Super User

Hello @MacJasem ,

 

So you should be able to know each transactions is for what company, then you could add a calculated column to define the new concept which its like if company is related to A or B then "Company x" else company Y so this way you configure that A & B belong to X and when you filter with X it will automatically get the data or companies A & B.

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




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.