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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Multiple criteria for each line =- PnL

Hello,

 

I am trying to build PnL in power BI and I need to find a way to have different criteria for each line level but they have the same GL account number. for example:

 

PnL Template

 

      PAPERneed to Sum main account 50000 with  Item group paper Lab or Paper ENVS
      WINDOW MATERIALneed to Sum main account 50000 with  Item group Ext Work
      BOXESneed to Sum main account 50000 with  Item group Boxes

 

MainAccountDepartmentcost centerItemGroup
5000010 PAPER LAB
5000010 LABEL
5000010 INK ENVS
5000010 EXT WORK
5000010LABELINK LAB
5000010ENVSBOXES
5000010ENVSPAPER ENVS

 

Thank you

4 REPLIES 4
Fowmy
Super User
Super User

@Anonymous 

The right way to model this is to have a separate dimension table with all the unique values of the Item Groups and their relevant main group. Then you can link your Item Group in the transaction table to this dimension table using Item Group. You can also replace it with a number like ItemGroup ID.

You have the option of creating a relationship or use a function like LOOKUPVALUE to get the correct group.

ItemGroup IDItemGroupMain Group
1PAPER LABPaper
2LABEL 
3INK ENVS 
4EXT WORKWindow Material
5INK LAB 
6BOXESBoxes
7PAPER ENVSPaper

 

 

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

@Fowmy 

It does not work because some of the item groups are repeated in different Account number for instance:

GL account                             Item Group         Main Group

50000PAPER LABPaper
60080PAPER LABPaper

 

I need to find a way and have  the sum for the different criteria of the total line GL + Item Group + Main group

@Anonymous 

 

Having duplicates in the many side is fine But you need to have the UNIQUE list on the dimension table 

 

Share. Sample PBIX file if with clean explanation if you need see how it can be done. 

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

@Fowmy 

Here is the link for the data sample

https://1drv.ms/u/s!Asvh0-7ZghBPn347P5s1pzHCNzyg?e=fs2hmJ

you will see in the P&L that my sales - Label amount 64696$ because each line of sales have a different Main Account

However, that's not the same case in the Raw Material, as you can see the Paper, Window Material, boxes & inks have the same amount 154 272$ because its the same GL used for the Raw Materials but each material have a different Cost Center & Item Group.

Each line of Raw material is a different combination for Example PAPER should be:

 

Raw material      Main account        Cost Center      Item Group               amount

Paper                     50000           -       ENVS         -     PAPER ENVS           1000

Paper                     50000           -                         -     PAPER ENVS            500

Paper                     50000           -       LABEL         -     PAPER LAB              500

Paper                     50000           -       PACKAGIN-     PAPER PKG               1000

-----------------------------------------------------------------------------------------------

In the P&L total Paper                                                                                    3000$

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.