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
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
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.