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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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