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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

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
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.