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

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 III
Helper III

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.