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
Anonymous
Not applicable

How make a measure(total revenue) adding multiple general ledger account No.

 

Hi PBIXer,

I want create a measure ( Total Revenue ) using a general ledger account No.(300001,3000002,300005) taking sum of all the mentioned  G/L account no. amount.

 

I'm trying to go in the row level to add mentioned account No. to achieve this measure but not getting it .

Attaching the Screenshot to simplify the Understanding,

 

Kamleshparmar_1-1654084185613.png

 

 

A swift reply is appreciable.

Thank you in advance.

 

 

 

1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

Hi @Anonymous 

 

As a starting point, I would try a measure like this:

Total Revenue =
CALCULATE (
    SUM ( YourTable[Amount] ),
    YourTable[G/L Account No.] IN { 300001, 3000002, 300005 }
)

Account Numbers may need to be placed in double quotes if the column is of type text.

 

Also, I would generally advise having a separate G/L dimension table related to your fact table, and apply filters to that table.

 

Regards,

Owen


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

View solution in original post

3 REPLIES 3
Syk
Super User
Super User

To get the sum row by row you can use sumx like this

Total Revenue = SUMX(Table,Table[Amount])
OwenAuger
Super User
Super User

Hi @Anonymous 

 

As a starting point, I would try a measure like this:

Total Revenue =
CALCULATE (
    SUM ( YourTable[Amount] ),
    YourTable[G/L Account No.] IN { 300001, 3000002, 300005 }
)

Account Numbers may need to be placed in double quotes if the column is of type text.

 

Also, I would generally advise having a separate G/L dimension table related to your fact table, and apply filters to that table.

 

Regards,

Owen


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn
Anonymous
Not applicable

Hi Owen,

Can you please explain about the suggestion you mentioned for the having a separate G/L dimension table related to your fact table.

 

(Also, I would generally advise having a separate G/L dimension table related to your fact table, and apply filters to that table.)

 

Can you make a simple demo PBIX and explain.

But Thank you achieve 90% of my doubt.

 

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.